diff options
author | jahoti <jahoti@tilde.team> | 2021-10-10 00:00:00 +0000 |
---|---|---|
committer | jahoti <jahoti@tilde.team> | 2021-10-10 00:00:00 +0000 |
commit | 086913c54147d04be762c82d59e88906ec6ec9d8 (patch) | |
tree | 55c42f4e5f0fcce577556b608e7d224927ab5e01 | |
parent | 95b040ff77bc15f18e9b6976fbcb83712844f7c7 (diff) | |
download | browser-extension-086913c54147d04be762c82d59e88906ec6ec9d8.tar.gz browser-extension-086913c54147d04be762c82d59e88906ec6ec9d8.zip |
Quote $BUILDDIR throughout build.sh
Ensure build.sh can deal with arbitrary build directories.
-rwxr-xr-x | build.sh | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -179,7 +179,7 @@ build_main() { OPTIONSSCRIPTS="$(as_html_list $COMPUTED_SCRIPTS)" for DIR in $(find $SCRIPTDIRS -type d); do - mkdir -p $BUILDDIR/$DIR + mkdir -p "$BUILDDIR"/$DIR done CHROMIUM_KEY='' @@ -221,15 +221,15 @@ s^_CHROMIUM_KEY_^$CHROMIUM_KEY^ s^_CHROMIUM_UPDATE_URL_^$CHROMIUM_UPDATE_URL^ s^_BGSCRIPTS_^$BGSCRIPTS^ s^_CONTENTSCRIPTS_^$CONTENTSCRIPTS^" \ - < manifest.json > $BUILDDIR/manifest.json + < manifest.json > "$BUILDDIR"/manifest.json ./process_html_file.sh html/display-panel.html | sed "s^_POPUPSCRIPTS_^$POPUPSCRIPTS^" \ - > $BUILDDIR/html/display-panel.html + > "$BUILDDIR"/html/display-panel.html ./process_html_file.sh html/options.html | sed "s^_OPTIONSSCRIPTS_^$OPTIONSSCRIPTS^" \ - > $BUILDDIR/html/options.html + > "$BUILDDIR"/html/options.html for FILE in $SCRIPTS; do FILEKEY=$(sanitize "$FILE") @@ -255,16 +255,16 @@ fi echo " $(map_get EXPORTCODES $FILEKEY) -})}).fun();") > $BUILDDIR/$FILE +})}).fun();") > "$BUILDDIR"/$FILE fi done if [ "$BROWSER" = "chromium" ]; then - cat > $BUILDDIR/exports_init.js <<EOF + cat > "$BUILDDIR"/exports_init.js <<EOF window.killtheweb={is_chrome: true, browser: window.chrome}; EOF else - cat > $BUILDDIR/exports_init.js <<EOF + cat > "$BUILDDIR"/exports_init.js <<EOF /* Polyfill for IceCat 60. */ String.prototype.matchAll = String.prototype.matchAll || function(regex) { if (regex.flags.search("g") === -1) @@ -280,18 +280,18 @@ window.killtheweb={is_mozilla: true, browser: this.browser}; EOF fi - cp -r copyright licenses/ $BUILDDIR - cp html/*.css $BUILDDIR/html - mkdir $BUILDDIR/icons - cp icons/*.png $BUILDDIR/icons + cp -r copyright licenses/ "$BUILDDIR" + cp html/*.css "$BUILDDIR"/html + mkdir "$BUILDDIR"/icons + cp icons/*.png "$BUILDDIR"/icons if [ "$BROWSER" = "chromium" ]; then - for MOZILLA_FILE in $(find $BUILDDIR -name "MOZILLA_*"); do + for MOZILLA_FILE in $(find "$BUILDDIR" -name "MOZILLA_*"); do echo > "$MOZILLA_FILE" done fi if [ "$BROWSER" = "mozilla" ]; then - for CHROMIUM_FILE in $(find $BUILDDIR -name "CHROMIUM_*"); do + for CHROMIUM_FILE in $(find "$BUILDDIR" -name "CHROMIUM_*"); do echo > "$CHROMIUM_FILE" done fi |