uBlock/tools/make-webext.sh

47 lines
1.7 KiB
Bash
Raw Normal View History

2016-10-19 16:21:19 +02:00
#!/usr/bin/env bash
#
# This script assumes a linux environment
echo "*** uBlock0.webext: Creating web store package"
echo "*** uBlock0.webext: Copying files"
DES=dist/build/uBlock0.webext
rm -rf $DES
mkdir -p $DES/webextension
2016-10-19 16:21:19 +02:00
bash ./tools/make-assets.sh $DES/webextension
2016-10-19 16:21:19 +02:00
cp -R src/css $DES/webextension/
cp -R src/img $DES/webextension/
cp -R src/js $DES/webextension/
cp -R src/lib $DES/webextension/
cp -R src/_locales $DES/webextension/
cp -R $DES/webextension/_locales/nb $DES/webextension/_locales/no
cp src/*.html $DES/webextension/
cp platform/chromium/*.js $DES/webextension/js/
cp -R platform/chromium/img $DES/webextension/
cp platform/chromium/*.html $DES/webextension/
cp platform/chromium/*.json $DES/webextension/
cp platform/webext/polyfill.js $DES/webextension/js/
cp LICENSE.txt $DES/webextension/
cp platform/webext/background.html $DES/webextension/
cp platform/webext/from-legacy.js $DES/webextension/js/
cp platform/webext/manifest.json $DES/webextension/
cp platform/webext/bootstrap.js $DES/
cp platform/webext/chrome.manifest $DES/
cp platform/webext/install.rdf $DES/
mv $DES/webextension/img/icon_128.png $DES/icon.png
2016-10-19 16:21:19 +02:00
echo "*** uBlock0.webext: Generating meta..."
python tools/make-webext-meta.py $DES/
2016-10-19 16:21:19 +02:00
if [ "$1" = all ]; then
echo "*** uBlock0.webext: Creating package..."
pushd $DES > /dev/null
2017-04-02 16:55:50 +02:00
zip ../$(basename $DES).xpi -qr *
2016-10-19 16:21:19 +02:00
popd > /dev/null
fi
echo "*** uBlock0.webext: Package done."