Files
HamPack/patch-potacat.sh
David Young f810313918 remove rpm
2026-03-23 14:49:14 -06:00

33 lines
923 B
Bash
Executable File

#!/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.')
"