2019-12-14 21:29:41 +08:00
|
|
|
#!/bin/bash
|
|
|
|
#每周运行一次
|
|
|
|
|
|
|
|
source /etc/profile
|
|
|
|
cd $(cd "$(dirname "$0")";pwd)
|
|
|
|
|
2019-12-21 17:05:28 +08:00
|
|
|
nohup php research-addr.php >> ./std-research.out
|
|
|
|
cd ../dist/
|
2019-12-29 11:09:58 +08:00
|
|
|
sed -E 's/address=\/(.+)?\//||\1^/g' anti-ad-dnsmasq-full.conf > anti-ad-easylist-full.txt
|
|
|
|
sed -E 's/address=\/(.+)?\//||\1^/g' anti-ad-dnsmasq-basic.conf > anti-ad-easylist-basic.txt
|
2019-12-21 17:05:28 +08:00
|
|
|
sed -E 's/address=\/(.+)?\//DOMAIN-SUFFIX,\1,REJECT/g' anti-ad-dnsmasq-basic.conf >anti-ad-surge-basic.txt
|
|
|
|
sed -E 's/address=\/(.+)?\//DOMAIN-SUFFIX,\1,REJECT/g' anti-ad-dnsmasq-full.conf >anti-ad-surge-full.txt
|
|
|
|
sed -i '3 i [RULE]' anti-ad-surge-basic.txt
|
|
|
|
sed -i '3 i [RULE]' anti-ad-surge-full.txt
|
2019-12-21 17:16:48 +08:00
|
|
|
|
|
|
|
cd ../tools
|
|
|
|
|
2019-12-29 11:09:58 +08:00
|
|
|
php easylist-extend.php dist/anti-ad-easylist-basic.txt
|
|
|
|
php easylist-extend.php dist/anti-ad-easylist-full.txt
|
2019-12-21 17:16:48 +08:00
|
|
|
rm -f std-split-tmp-list_*.out
|