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