aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xbuild.bash21
1 files changed, 18 insertions, 3 deletions
diff --git a/build.bash b/build.bash
index 1af320c..4dfc387 100755
--- a/build.bash
+++ b/build.bash
@@ -7,15 +7,30 @@ BROWSER=$1
rm -rf "$dist"
mkdir "$dist"
find src/ -not -name "*.js" -exec cp '{}' "$dist" \;
-cp LICENSE.txt "$dist"
+cp README.md LICENSE.txt "$dist"
npm run build
-cd "$dist"
+echo
+
+rm -f archiveror.zip archiveror-source.zip
+
if [[ $BROWSER = 'chromium' ]]; then
+ cd "$dist"
# the "applications" key is only supported on Firefox
jq 'del(.applications)' manifest.json > mani.json
rm manifest.json
mv mani.json manifest.json
+ cd -
+elif [[ $BROWSER = 'firefox' ]]; then
+ echo -e "\nMaking archiveror-source.zip for Firefox..."
+ zip -r archiveror-source.zip src/ build.bash package.json package-lock.json webpack.config.js README.md LICENSE.txt
+else
+ echo "Invalid browser choice!"
+ exit 1
fi
-zip archiveror.zip *.js *.html *.css *.png manifest.json LICENSE.txt
+cd "$dist"
+echo -e "\nMaking archiveror.zip..."
+zip archiveror.zip *.js *.html *.css *.png manifest.json README.md LICENSE.txt
+cd -
+mv "$dist"/archiveror.zip ./