diff options
author | hackademix | 2018-08-01 17:48:45 +0200 |
---|---|---|
committer | hackademix | 2018-08-01 17:48:45 +0200 |
commit | 76190a644e5b73240af2b02625e0a773e6634a86 (patch) | |
tree | 199eda2fac72653eca43c0f715b3ab051b493be2 /build.sh | |
parent | 140d8759cfe4a4bbaedcf9e7d4429e8cb889a3c9 (diff) | |
download | noscript-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.sh | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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" |