2014-11-24 12:00:27 -07:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# This script assumes a linux environment
|
|
|
|
|
2015-04-09 05:15:14 -06:00
|
|
|
echo "*** uBlock0.firefox: Copying files"
|
2014-12-18 02:47:14 -07:00
|
|
|
|
2015-04-09 05:15:14 -06:00
|
|
|
DES=dist/build/uBlock0.firefox
|
2015-02-05 15:13:39 -07:00
|
|
|
rm -rf $DES
|
2014-11-24 12:00:27 -07:00
|
|
|
mkdir -p $DES
|
2014-12-18 02:47:14 -07:00
|
|
|
|
2015-08-27 11:52:05 -06:00
|
|
|
cp -R assets $DES/
|
|
|
|
rm $DES/assets/*.sh
|
|
|
|
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 13:53:56 -07:00
|
|
|
|
|
|
|
# AMO review feedback: avoid "unnecessary files or folders" in package
|
|
|
|
cat src/background.html | sed -e '/vapi-polyfill\.js/d' > $DES/background.html
|
|
|
|
|
2015-08-27 11:52:05 -06:00
|
|
|
mv $DES/img/icon_128.png $DES/icon.png
|
|
|
|
cp platform/firefox/css/* $DES/css/
|
|
|
|
cp platform/firefox/vapi-*.js $DES/js/
|
|
|
|
cp platform/firefox/bootstrap.js $DES/
|
|
|
|
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 12:00:27 -07:00
|
|
|
|
2015-04-09 05:15:14 -06:00
|
|
|
echo "*** uBlock0.firefox: Generating meta..."
|
2015-08-12 14:31:19 -06:00
|
|
|
python tools/make-firefox-meta.py $DES/ "$2"
|
2014-11-24 12:00:27 -07:00
|
|
|
|
2015-01-13 07:28:53 -07:00
|
|
|
if [ "$1" = all ]; then
|
2015-04-09 05:15:14 -06:00
|
|
|
echo "*** uBlock0.firefox: Creating package..."
|
2015-01-13 07:28:53 -07:00
|
|
|
pushd $DES/
|
2015-04-09 05:15:14 -06:00
|
|
|
zip ../uBlock0.firefox.xpi -qr *
|
2015-01-13 07:28:53 -07:00
|
|
|
popd
|
|
|
|
fi
|
2015-01-13 05:55:45 -07:00
|
|
|
|
2015-04-09 05:15:14 -06:00
|
|
|
echo "*** uBlock0.firefox: Package done."
|