summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorhackademix2018-08-02 01:50:09 +0200
committerhackademix2018-08-02 01:50:09 +0200
commita97176845d25badb770223c149241f810a83288d (patch)
tree9f49952a27779693265f0c0c02dd97ef7738bd14 /build.sh
parent99e8c8b09f7270d335985fb84fa237323dfe2242 (diff)
downloadnoscript-a97176845d25badb770223c149241f810a83288d.tar.gz
noscript-a97176845d25badb770223c149241f810a83288d.tar.xz
noscript-a97176845d25badb770223c149241f810a83288d.zip
Consistent filesystem path quoting in shell scripts.
Diffstat (limited to 'build.sh')
-rw-r--r--build.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/build.sh b/build.sh
index ec912fc..821857e 100644
--- a/build.sh
+++ b/build.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-BASE=$PWD
+BASE="$PWD"
SRC="$BASE/src"
BUILD="$BASE/build"
MANIFEST_IN="$SRC/manifest.json"
@@ -24,7 +24,7 @@ LIB="$SRC/lib"
TLD="$BASE/TLD"
if ! [ $(date -r "$LIB/tld.js" +'%Y%m%d') -ge $(date +'%Y%m%d') ] && "$TLD/generate.sh"; then
- cp -u "$TLD/tld.js" $LIB
+ cp -u "$TLD/tld.js" "$LIB"
fi
./html5_events/html5_events.pl
@@ -44,9 +44,9 @@ if ! grep '"id":' "$MANIFEST_OUT" >/dev/null; then
exit 1
fi
-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)
+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
@@ -61,7 +61,7 @@ fi
echo "Creating $XPI.xpi..."
mkdir -p "$XPI_DIR"
-"$BUILD_CMD" $BUILD_OPTS --source-dir=$(cygpath -w $BUILD) --artifacts-dir=$(cygpath -w $XPI_DIR) --ignore-files=test/XSS_test.js
+"$BUILD_CMD" $BUILD_OPTS --source-dir=$(cygpath -w "$BUILD") --artifacts-dir=$(cygpath -w "$XPI_DIR") --ignore-files=test/XSS_test.js
SIGNED="$XPI_DIR/noscript_security_suite-$VER-an+fx.xpi"
if [ -f "$SIGNED" ]; then
mv "$SIGNED" "$XPI.xpi"