2016-10-19 08:21:19 -06: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
|
2017-03-05 06:25:55 -07:00
|
|
|
mkdir -p $DES/webextension
|
2016-10-19 08:21:19 -06:00
|
|
|
|
2017-03-05 06:25:55 -07:00
|
|
|
bash ./tools/make-assets.sh $DES/webextension
|
2016-10-19 08:21:19 -06:00
|
|
|
|
2017-03-05 06:25:55 -07: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 08:21:19 -06:00
|
|
|
|
2016-10-19 17:07:59 -06:00
|
|
|
echo "*** uBlock0.webext: Generating meta..."
|
|
|
|
python tools/make-webext-meta.py $DES/
|
|
|
|
|
2016-10-19 08:21:19 -06:00
|
|
|
if [ "$1" = all ]; then
|
|
|
|
echo "*** uBlock0.webext: Creating package..."
|
2017-03-05 06:25:55 -07:00
|
|
|
pushd $DES > /dev/null
|
2017-04-02 08:55:50 -06:00
|
|
|
zip ../$(basename $DES).xpi -qr *
|
2016-10-19 08:21:19 -06:00
|
|
|
popd > /dev/null
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "*** uBlock0.webext: Package done."
|