fix patch script

This commit is contained in:
David Young
2026-03-20 20:09:32 -06:00
parent 075137a218
commit a02fa9cd75

View File

@@ -9,12 +9,17 @@ if [ ! -f "$PACKAGE_JSON" ]; then
exit 1 exit 1
fi fi
if ! grep -q '"deb"' "$PACKAGE_JSON"; then python3 -c "
echo "No deb target found in $PACKAGE_JSON, nothing to do." import json, sys
exit 0 with open('$PACKAGE_JSON', 'r') as f:
fi data = json.load(f)
targets = data.get('build', {}).get('linux', {}).get('target', [])
# Remove "deb" entry including trailing or leading comma if 'deb' in targets:
sed -i '/"deb"/d' "$PACKAGE_JSON" targets.remove('deb')
data['build']['linux']['target'] = targets
echo "Removed deb target from $PACKAGE_JSON." 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.')
"