diff options
author | Yuchen Pei <hi@ypei.me> | 2022-09-23 12:01:42 +1000 |
---|---|---|
committer | Yuchen Pei <hi@ypei.me> | 2022-09-23 12:01:42 +1000 |
commit | 57c1a37c72208372e0bdf40ed3bdfc2a55f5c291 (patch) | |
tree | 3f769b424a47bba91e3e9a945f9ca1399b14268f | |
parent | 32c511b0c57ebcb37a7593a6b8f07d0035ef74a9 (diff) |
shellcheck build.sh
-rwxr-xr-x | build.sh | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |