summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorhackademix2018-08-01 17:48:45 +0200
committerhackademix2018-08-01 17:48:45 +0200
commit76190a644e5b73240af2b02625e0a773e6634a86 (patch)
tree199eda2fac72653eca43c0f715b3ab051b493be2 /build.sh
parent140d8759cfe4a4bbaedcf9e7d4429e8cb889a3c9 (diff)
downloadnoscript-76190a644e5b73240af2b02625e0a773e6634a86.tar.gz
noscript-76190a644e5b73240af2b02625e0a773e6634a86.tar.xz
noscript-76190a644e5b73240af2b02625e0a773e6634a86.zip
Improved support for debugging code removal in releases.
Diffstat (limited to 'build.sh')
-rw-r--r--build.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index a43a66a..ec912fc 100644
--- a/build.sh
+++ b/build.sh
@@ -44,7 +44,11 @@ if ! grep '"id":' "$MANIFEST_OUT" >/dev/null; then
exit 1
fi
-sed -re 's/\/\/\s*(.*)\s*\/\/ XPI_ONLY/\1/' $SRC/content/content.js > $BUILD/content/content.js
+for file in $SRC/content/*.js; do
+ if grep -P '\/\/\s(REL|DEV)_ONLY' $file >/dev/null; then
+ sed -re 's/\s*\/\/\s*(\S.*)\s*\/\/\s*REL_ONLY.*/\1/' -e 's/.*\/\/\s*DEV_ONLY.*//' $file > $BUILD/content/$(basename $file)
+ fi
+done
if [ "$1" == "sign" ]; then
BUILD_CMD="$BASE/../../we-sign"