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