From 57c1a37c72208372e0bdf40ed3bdfc2a55f5c291 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Fri, 23 Sep 2022 12:01:42 +1000 Subject: shellcheck build.sh --- build.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 0cd41d7..526ac8b 100755 --- a/build.sh +++ b/build.sh @@ -1,3 +1,4 @@ +#!/bin/bash PATH=$PATH:./node_modules/.bin which browserify > /dev/null || (echo "can not find browserify" && false) || exit @@ -19,7 +20,7 @@ browserify main_background.js -o bundle.js mkdir ./build_temp # Move source files to temp directory -if [ "$1" == "-t" -o "$1" == "--test" ]; then +if [ "$1" == "-t" ] || [ "$1" == "--test" ]; then cp -r ./test ./build_temp fi cp -r ./icons ./build_temp @@ -30,8 +31,8 @@ cp manifest.json ./build_temp cp bundle.js ./build_temp # build zip file from temp directory -cd ./build_temp -zip -r librejs.zip * +cd ./build_temp || exit +zip -r librejs.zip ./* # remove old file rm ../librejs.xpi || true # move new zip file -- cgit v1.2.3