From d27d37cfd9f443ddc6cbe1d3d64b9320c7dd4d28 Mon Sep 17 00:00:00 2001 From: jondale Date: Thu, 15 Jan 2026 18:28:10 -0500 Subject: [PATCH] updating bundle script to be more robust --- scripts/bundle.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/scripts/bundle.sh b/scripts/bundle.sh index e3c7ad3..399ede4 100755 --- a/scripts/bundle.sh +++ b/scripts/bundle.sh @@ -46,18 +46,25 @@ post_process() { echo "Patching $inx" - # 1) Set the ... - sed -i 's|[^<]*|org.knoxmakers.botbox|' "$inx" + # Replace the FIRST ... block, regardless of whitespace/newlines inside. + # (GNU sed on Debian supports the 0,ADDR form.) + sed -i '0,/]/{ +/]/,/<\/id>/c\ +org.knoxmakers.botbox +}' "$inx" - # 2) Replace the ... block - sed -i '//,/<\/effectsmenu>/c\ + # Replace the FIRST ... block (handles attributes + multiline) + sed -i '0,/]*>/{ +/]*>/,/<\/effectsmenu>/c\ \ \ \ \ -' "$inx" + +}' "$inx" } + main() { # Sync phase for entry in "${REPOS[@]}"; do