#!/bin/bash # # Purpose : Remove deb target from electron-builder package.json PACKAGE_JSON="${1:-package.json}" if [ ! -f "$PACKAGE_JSON" ]; then echo "Error: $PACKAGE_JSON not found." exit 1 fi python3 -c " import json, sys with open('$PACKAGE_JSON', 'r') as f: data = json.load(f) targets = data.get('build', {}).get('linux', {}).get('target', []) if 'deb' in targets: targets.remove('deb') data['build']['linux']['target'] = targets with open('$PACKAGE_JSON', 'w') as f: json.dump(data, f, indent=2) print('Removed deb target from $PACKAGE_JSON.') else: print('No deb target found, nothing to do.') if 'rpm' in targets: targets.remove('rpm') data['build']['linux']['target'] = targets with open('$PACKAGE_JSON', 'w') as f: json.dump(data, f, indent=2) print('Removed rpm target from $PACKAGE_JSON.') else: print('No rpm target found, nothing to do.') "