2015-09-22 19:29:26 +02:00
|
|
|
#!/usr/bin/env bash
|
2014-11-24 20:00:27 +01:00
|
|
|
#
|
|
|
|
# This script assumes a linux environment
|
|
|
|
|
2015-04-09 13:15:14 +02:00
|
|
|
echo "*** uBlock0.firefox: Copying files"
|
2014-12-18 10:47:14 +01:00
|
|
|
|
2015-04-09 13:15:14 +02:00
|
|
|
DES=dist/build/uBlock0.firefox
|
2015-02-05 23:13:39 +01:00
|
|
|
rm -rf $DES
|
2014-11-24 20:00:27 +01:00
|
|
|
mkdir -p $DES
|
2014-12-18 10:47:14 +01:00
|
|
|
|
2016-06-09 18:32:00 +02:00
|
|
|
bash ./tools/make-assets.sh $DES
|
2016-04-03 19:07:46 +02:00
|
|
|
|
2015-08-27 19:52:05 +02:00
|
|
|
cp -R src/css $DES/
|
|
|
|
cp -R src/img $DES/
|
|
|
|
cp -R src/js $DES/
|
|
|
|
cp -R src/lib $DES/
|
|
|
|
cp -R src/_locales $DES/
|
|
|
|
cp src/*.html $DES/
|
2015-12-26 21:53:56 +01:00
|
|
|
|
2015-08-27 19:52:05 +02:00
|
|
|
mv $DES/img/icon_128.png $DES/icon.png
|
|
|
|
cp platform/firefox/css/* $DES/css/
|
2016-09-12 16:22:25 +02:00
|
|
|
cp platform/firefox/polyfill.js $DES/js/
|
2015-08-27 19:52:05 +02:00
|
|
|
cp platform/firefox/vapi-*.js $DES/js/
|
2017-10-21 19:43:46 +02:00
|
|
|
cp platform/webext/vapi-usercss.js $DES/js/
|
2015-08-27 19:52:05 +02:00
|
|
|
cp platform/firefox/bootstrap.js $DES/
|
2016-09-24 20:36:08 +02:00
|
|
|
cp platform/firefox/processScript.js $DES/
|
2015-08-27 19:52:05 +02:00
|
|
|
cp platform/firefox/frame*.js $DES/
|
|
|
|
cp -R platform/firefox/img $DES/
|
|
|
|
cp platform/firefox/chrome.manifest $DES/
|
|
|
|
cp platform/firefox/install.rdf $DES/
|
|
|
|
cp platform/firefox/*.xul $DES/
|
|
|
|
cp LICENSE.txt $DES/
|
2014-11-24 20:00:27 +01:00
|
|
|
|
2017-10-24 18:40:58 +02:00
|
|
|
echo "*** uBlock0.firefox: concatenating content scripts"
|
|
|
|
cat $DES/js/vapi-usercss.js > /tmp/contentscript.js
|
|
|
|
echo >> /tmp/contentscript.js
|
|
|
|
grep -v "^'use strict';$" $DES/js/contentscript.js >> /tmp/contentscript.js
|
|
|
|
mv /tmp/contentscript.js $DES/js/contentscript.js
|
|
|
|
rm $DES/js/vapi-usercss.js
|
|
|
|
|
2015-04-09 13:15:14 +02:00
|
|
|
echo "*** uBlock0.firefox: Generating meta..."
|
2016-08-04 14:24:11 +02:00
|
|
|
python tools/make-firefox-meta.py $DES/
|
2014-11-24 20:00:27 +01:00
|
|
|
|
2015-01-13 15:28:53 +01:00
|
|
|
if [ "$1" = all ]; then
|
2016-04-04 00:06:19 +02:00
|
|
|
set +v
|
2015-04-09 13:15:14 +02:00
|
|
|
echo "*** uBlock0.firefox: Creating package..."
|
2016-04-04 00:06:19 +02:00
|
|
|
pushd $DES/ > /dev/null
|
2015-04-09 13:15:14 +02:00
|
|
|
zip ../uBlock0.firefox.xpi -qr *
|
2016-04-04 00:06:19 +02:00
|
|
|
popd > /dev/null
|
2015-01-13 15:28:53 +01:00
|
|
|
fi
|
2015-01-13 13:55:45 +01:00
|
|
|
|
2015-04-09 13:15:14 +02:00
|
|
|
echo "*** uBlock0.firefox: Package done."
|