From a02fa9cd752b85c71745c9dcfa1eeadd1c325d6b Mon Sep 17 00:00:00 2001 From: David Young Date: Fri, 20 Mar 2026 20:09:32 -0600 Subject: [PATCH] fix patch script --- patch-potacat.sh | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/patch-potacat.sh b/patch-potacat.sh index 5a12ae0..e2c68b5 100755 --- a/patch-potacat.sh +++ b/patch-potacat.sh @@ -9,12 +9,17 @@ if [ ! -f "$PACKAGE_JSON" ]; then exit 1 fi -if ! grep -q '"deb"' "$PACKAGE_JSON"; then - echo "No deb target found in $PACKAGE_JSON, nothing to do." - exit 0 -fi - -# Remove "deb" entry including trailing or leading comma -sed -i '/"deb"/d' "$PACKAGE_JSON" - -echo "Removed deb target from $PACKAGE_JSON." \ No newline at end of file +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.') +" \ No newline at end of file