1
0
Fork 0
mirror of https://github.com/gorhill/uMatrix.git synced 2024-05-19 11:43:21 +12:00
uMatrix/tools/make-firefox.sh

40 lines
1.1 KiB
Bash
Raw Normal View History

2018-08-26 04:05:55 +12:00
#!/usr/bin/env bash
#
# This script assumes a linux environment
echo "*** uMatrix.firefox: Creating web store package"
echo "*** uMatrix.firefox: Copying files"
2019-12-26 03:30:34 +13:00
BLDIR=dist/build
DES="$BLDIR"/uMatrix.firefox
2018-08-26 04:05:55 +12:00
rm -rf $DES
mkdir -p $DES
bash ./tools/make-assets.sh $DES
cp -R ./src/* $DES/
cp platform/chromium/*.js $DES/js/
cp -R platform/chromium/img/* $DES/img/
cp LICENSE.txt $DES/
cp platform/firefox/*.js $DES/js/
2018-08-26 04:05:55 +12:00
cp platform/firefox/manifest.json $DES/
echo "*** uMatrix.firefox: Generating meta..."
python tools/make-firefox-meta.py $DES/
if [ "$1" = all ]; then
echo "*** uMatrix.firefox: Creating package..."
pushd $DES > /dev/null
zip ../$(basename $DES).xpi -qr *
popd > /dev/null
2019-12-26 03:30:34 +13:00
elif [ -n "$1" ]; then
echo "*** uMatrix.firefox: Creating versioned package..."
pushd $DES > /dev/null
zip ../$(basename $DES).xpi -qr *
popd > /dev/null
mv "$BLDIR"/uMatrix.firefox.xpi "$BLDIR"/uMatrix_"$1".firefox.xpi
2018-08-26 04:05:55 +12:00
fi
echo "*** uMatrix.firefox: Package done."