diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 05:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 05:47:55 +0000 |
commit | 31d6ff6f931696850c348007241195ab3b2eddc7 (patch) | |
tree | 615cb1c57ce9f6611bad93326b9105098f379609 /tools/make-assets.sh | |
parent | Initial commit. (diff) | |
download | ublock-origin-31d6ff6f931696850c348007241195ab3b2eddc7.tar.xz ublock-origin-31d6ff6f931696850c348007241195ab3b2eddc7.zip |
Adding upstream version 1.55.0+dfsg.upstream/1.55.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/make-assets.sh')
-rwxr-xr-x | tools/make-assets.sh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tools/make-assets.sh b/tools/make-assets.sh new file mode 100755 index 0000000..2719f1d --- /dev/null +++ b/tools/make-assets.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +# +# This script assumes a linux environment + +set -e + +DES=$1/assets + +echo "*** Packaging assets in $DES... " + +rm -rf $DES +cp -R ./assets $DES/ + +VERSION=$(cat ./dist/version) +if [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "*** Removing $DES/assets.dev.json" + rm $DES/assets.dev.json +else + echo "*** Removing $DES/assets.json" + rm $DES/assets.json +fi + +mkdir $DES/thirdparties + +ASSETS_MAIN=dist/build/uAssets/main +ASSETS_PROD=dist/build/uAssets/prod + +cp -R $ASSETS_MAIN/thirdparties/pgl.yoyo.org $DES/thirdparties/ +cp -R $ASSETS_MAIN/thirdparties/publicsuffix.org $DES/thirdparties/ +cp -R $ASSETS_MAIN/thirdparties/urlhaus-filter $DES/thirdparties/ + +mkdir -p $DES/thirdparties/easylist +cp $ASSETS_PROD/thirdparties/easylist.txt $DES/thirdparties/easylist/ +cp $ASSETS_PROD/thirdparties/easyprivacy.txt $DES/thirdparties/easylist/ + +mkdir $DES/ublock +cp $ASSETS_PROD/filters/badlists.txt $DES/ublock/badlists.txt +cp $ASSETS_PROD/filters/badware.min.txt $DES/ublock/badware.min.txt +cp $ASSETS_PROD/filters/filters.min.txt $DES/ublock/filters.min.txt +cp $ASSETS_PROD/filters/privacy.min.txt $DES/ublock/privacy.min.txt +cp $ASSETS_PROD/filters/quick-fixes.min.txt $DES/ublock/quick-fixes.min.txt +cp $ASSETS_PROD/filters/unbreak.min.txt $DES/ublock/unbreak.min.txt |