summaryrefslogtreecommitdiffstats
path: root/tools/make-firefox.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 05:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 05:47:55 +0000
commit31d6ff6f931696850c348007241195ab3b2eddc7 (patch)
tree615cb1c57ce9f6611bad93326b9105098f379609 /tools/make-firefox.sh
parentInitial commit. (diff)
downloadublock-origin-31d6ff6f931696850c348007241195ab3b2eddc7.tar.xz
ublock-origin-31d6ff6f931696850c348007241195ab3b2eddc7.zip
Adding upstream version 1.55.0+dfsg.upstream/1.55.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/make-firefox.sh')
-rwxr-xr-xtools/make-firefox.sh44
1 files changed, 44 insertions, 0 deletions
diff --git a/tools/make-firefox.sh b/tools/make-firefox.sh
new file mode 100755
index 0000000..2278c58
--- /dev/null
+++ b/tools/make-firefox.sh
@@ -0,0 +1,44 @@
+#!/usr/bin/env bash
+#
+# This script assumes a linux environment
+
+set -e
+
+echo "*** uBlock0.firefox: Creating web store package"
+
+BLDIR=dist/build
+DES="$BLDIR"/uBlock0.firefox
+rm -rf $DES
+mkdir -p $DES
+
+echo "*** uBlock0.firefox: Copying common files"
+bash ./tools/copy-common-files.sh $DES
+
+# Firefox-specific
+echo "*** uBlock0.firefox: Copying firefox-specific files"
+cp platform/firefox/*.json $DES/
+cp platform/firefox/*.js $DES/js/
+
+# Firefox store-specific
+cp -R $DES/_locales/nb $DES/_locales/no
+
+# Firefox/webext-specific
+rm $DES/img/icon_128.png
+
+echo "*** uBlock0.firefox: Generating meta..."
+python3 tools/make-firefox-meta.py $DES/
+
+if [ "$1" = all ]; then
+ echo "*** uBlock0.firefox: Creating package..."
+ pushd $DES > /dev/null
+ zip ../$(basename $DES).xpi -qr *
+ popd > /dev/null
+elif [ -n "$1" ]; then
+ echo "*** uBlock0.firefox: Creating versioned package..."
+ pushd $DES > /dev/null
+ zip ../$(basename $DES).xpi -qr *
+ popd > /dev/null
+ mv "$BLDIR"/uBlock0.firefox.xpi "$BLDIR"/uBlock0_"$1".firefox.xpi
+fi
+
+echo "*** uBlock0.firefox: Package done."