2015-09-22 11:29:26 -06:00
|
|
|
#!/usr/bin/env bash
|
2014-10-17 13:44:19 -06:00
|
|
|
#
|
|
|
|
# This script assumes a linux environment
|
|
|
|
|
2015-04-09 05:29:07 -06:00
|
|
|
echo "*** uBlock0.chromium: Creating web store package"
|
2014-12-18 02:47:14 -07:00
|
|
|
|
2017-10-01 08:28:33 -06:00
|
|
|
DES=dist/build/uBlock0.chromium
|
2015-02-05 15:13:39 -07:00
|
|
|
rm -rf $DES
|
2014-11-15 19:21:13 -07:00
|
|
|
mkdir -p $DES
|
2014-12-18 02:47:14 -07:00
|
|
|
|
2021-07-16 08:06:58 -06:00
|
|
|
echo "*** uBlock0.chromium: Copying common files"
|
2019-07-03 07:40:12 -06:00
|
|
|
bash ./tools/copy-common-files.sh $DES
|
2014-12-18 02:47:14 -07:00
|
|
|
|
2021-07-16 08:06:58 -06:00
|
|
|
# Chromium-specific
|
|
|
|
echo "*** uBlock0.chromium: Copying chromium-specific files"
|
|
|
|
cp platform/chromium/*.js $DES/js/
|
|
|
|
cp platform/chromium/*.html $DES/
|
|
|
|
cp platform/chromium/*.json $DES/
|
|
|
|
|
2017-11-10 09:36:55 -07:00
|
|
|
# Chrome store-specific
|
2018-02-15 15:25:38 -07:00
|
|
|
cp -R $DES/_locales/nb $DES/_locales/no
|
|
|
|
|
2017-10-01 08:28:33 -06:00
|
|
|
echo "*** uBlock0.chromium: Generating meta..."
|
|
|
|
python tools/make-chromium-meta.py $DES/
|
|
|
|
|
2015-01-14 00:51:16 -07:00
|
|
|
if [ "$1" = all ]; then
|
2018-12-23 08:16:08 -07:00
|
|
|
echo "*** uBlock0.chromium: Creating plain package..."
|
2016-04-03 16:06:19 -06:00
|
|
|
pushd $(dirname $DES/) > /dev/null
|
2015-04-09 05:29:07 -06:00
|
|
|
zip uBlock0.chromium.zip -qr $(basename $DES/)/*
|
2016-04-03 16:06:19 -06:00
|
|
|
popd > /dev/null
|
2018-12-23 08:16:08 -07:00
|
|
|
elif [ -n "$1" ]; then
|
|
|
|
echo "*** uBlock0.chromium: Creating versioned package..."
|
|
|
|
pushd $(dirname $DES/) > /dev/null
|
|
|
|
zip uBlock0_"$1".chromium.zip -qr $(basename $DES/)/*
|
|
|
|
popd > /dev/null
|
2015-01-14 00:51:16 -07:00
|
|
|
fi
|
|
|
|
|
2015-04-09 05:29:07 -06:00
|
|
|
echo "*** uBlock0.chromium: Package done."
|