2016-10-19 08:21:19 -06:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
#
|
|
|
|
# This script assumes a linux environment
|
|
|
|
|
2017-08-04 16:19:55 -06:00
|
|
|
echo "*** uBlock0.webext-hybrid: Creating web store package"
|
|
|
|
echo "*** uBlock0.webext-hybrid: Copying files"
|
2016-10-19 08:21:19 -06:00
|
|
|
|
2017-08-04 16:19:55 -06:00
|
|
|
DES=dist/build/uBlock0.webext-hybrid
|
2016-10-19 08:21:19 -06:00
|
|
|
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-08-29 16:32:00 -06: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 LICENSE.txt $DES/webextension/
|
2017-03-05 06:25:55 -07:00
|
|
|
|
2017-08-29 16:32:00 -06:00
|
|
|
cp platform/webext/manifest.json $DES/webextension/
|
|
|
|
cp platform/webext/background.html $DES/webextension/
|
|
|
|
cp platform/webext/options_ui.html $DES/webextension/
|
|
|
|
cp platform/webext/polyfill.js $DES/webextension/js/
|
|
|
|
cp platform/webext/vapi-usercss.js $DES/webextension/js/
|
|
|
|
cp platform/webext/vapi-cachestorage.js $DES/webextension/js/
|
|
|
|
cp platform/webext/from-legacy.js $DES/webextension/js/
|
2017-08-05 07:50:21 -06:00
|
|
|
rm $DES/webextension/js/options_ui.js
|
|
|
|
|
2017-08-29 16:32:00 -06:00
|
|
|
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
|
|
|
|
2017-08-04 16:19:55 -06:00
|
|
|
echo "*** uBlock0.webext-hybrid: Generating meta..."
|
|
|
|
python tools/make-webext-hybrid-meta.py $DES/
|
2016-10-19 17:07:59 -06:00
|
|
|
|
2016-10-19 08:21:19 -06:00
|
|
|
if [ "$1" = all ]; then
|
2017-08-04 16:19:55 -06:00
|
|
|
echo "*** uBlock0.webext-hybrid: 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
|
|
|
|
|
2017-08-04 16:19:55 -06:00
|
|
|
echo "*** uBlock0.webext-hybrid: Package done."
|