1
0
Fork 0
mirror of https://github.com/gorhill/uMatrix.git synced 2024-05-03 20:03:27 +12:00
uMatrix/tools/make-chromium.sh
2019-12-25 09:30:34 -05:00

37 lines
1 KiB
Bash
Executable file

#!/bin/bash
#
# This script assumes a linux environment
echo "*** uMatrix(Chromium): Creating package"
echo "*** uMatrix(Chromium): Copying files"
DES=./dist/build/uMatrix.chromium
rm -rf $DES
mkdir -p $DES
bash ./tools/make-assets.sh $DES
cp -R ./src/* $DES/
cp -R $DES/_locales/nb $DES/_locales/no # Chrome store quirk
cp ./platform/chromium/*.js $DES/js/
cp -R ./platform/chromium/img/* $DES/img/
cp ./platform/chromium/manifest.json $DES/
cp LICENSE.txt $DES/
echo "*** uMatrix.chromium: Generating meta..."
python tools/make-chromium-meta.py $DES/
if [ "$1" = all ]; then
echo "*** uMatrix.chromium: Creating package..."
pushd $(dirname $DES/)
zip uMatrix.chromium.zip -qr $(basename $DES/)/*
popd
elif [ -n "$1" ]; then
echo "*** uMatrix.chromium: Creating versioned package..."
pushd $(dirname $DES/) > /dev/null
zip uMatrix_"$1".chromium.zip -qr $(basename $DES/)/*
popd > /dev/null
fi
echo "*** uMatrix(Chromium): Package done."