2015-09-22 11:29:26 -06:00
|
|
|
#!/usr/bin/env bash
|
2014-11-14 06:59:16 -07:00
|
|
|
#
|
|
|
|
# This script assumes a linux environment
|
|
|
|
|
|
|
|
echo "*** uBlock: generating checksums.txt file..."
|
2016-04-01 18:58:35 -06:00
|
|
|
|
2014-11-14 06:59:16 -07:00
|
|
|
truncate -s 0 assets/checksums.txt
|
2016-04-01 18:58:35 -06:00
|
|
|
|
|
|
|
echo `md5sum assets/ublock/filter-lists.json` >> assets/checksums.txt
|
|
|
|
|
|
|
|
filters=(
|
|
|
|
'../uAssets/filters/badware.txt'
|
|
|
|
'../uAssets/filters/experimental.txt'
|
|
|
|
'../uAssets/filters/filters.txt'
|
|
|
|
'../uAssets/filters/privacy.txt'
|
|
|
|
'../uAssets/filters/resources.txt'
|
|
|
|
'../uAssets/filters/unbreak.txt'
|
|
|
|
)
|
|
|
|
for repoPath in "${filters[@]}"; do
|
2016-04-02 06:31:29 -06:00
|
|
|
localPath=`printf $repoPath | sed 's/\.\.\/uAssets\/filters/assets\/ublock/'`
|
2016-04-02 06:59:43 -06:00
|
|
|
cp $repoPath $localPath
|
2016-04-02 06:31:29 -06:00
|
|
|
echo `md5sum $localPath` >> assets/checksums.txt
|
2016-04-01 18:58:35 -06:00
|
|
|
done
|
|
|
|
|
|
|
|
thirdparties=(
|
|
|
|
'../uAssets/thirdparties/easylist-downloads.adblockplus.org/easylist.txt'
|
|
|
|
'../uAssets/thirdparties/easylist-downloads.adblockplus.org/easyprivacy.txt'
|
|
|
|
'../uAssets/thirdparties/mirror1.malwaredomains.com/files/justdomains'
|
|
|
|
'../uAssets/thirdparties/pgl.yoyo.org/as/serverlist'
|
|
|
|
'../uAssets/thirdparties/publicsuffix.org/list/effective_tld_names.dat'
|
|
|
|
'../uAssets/thirdparties/www.malwaredomainlist.com/hostslist/hosts.txt'
|
|
|
|
)
|
|
|
|
for repoPath in "${thirdparties[@]}"; do
|
2016-04-02 06:31:29 -06:00
|
|
|
localPath=`printf $repoPath | sed 's/\.\.\/uAssets\/thirdparties/assets\/thirdparties/'`
|
2016-04-02 06:59:43 -06:00
|
|
|
cp $repoPath $localPath
|
2016-04-02 06:31:29 -06:00
|
|
|
echo `md5sum $localPath` >> assets/checksums.txt
|
2014-11-14 06:59:16 -07:00
|
|
|
done
|
|
|
|
|
|
|
|
echo "*** uBlock: checksums updated."
|
2016-04-01 18:58:35 -06:00
|
|
|
|
|
|
|
git status assets/
|