From 086913c54147d04be762c82d59e88906ec6ec9d8 Mon Sep 17 00:00:00 2001 From: jahoti Date: Sun, 10 Oct 2021 00:00:00 +0000 Subject: Quote $BUILDDIR throughout build.sh Ensure build.sh can deal with arbitrary build directories. --- build.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/build.sh b/build.sh index ec3a750..d3307d4 100755 --- a/build.sh +++ b/build.sh @@ -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 < "$BUILDDIR"/exports_init.js < $BUILDDIR/exports_init.js < "$BUILDDIR"/exports_init.js < "$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 -- cgit v1.2.3