forked from StevenBlack/hosts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sourcestats.sh
72 lines (67 loc) · 1.44 KB
/
sourcestats.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/sh
products="
alternates/fakenews
alternates/fakenews-gambling
alternates/fakenews-gambling-porn
alternates/fakenews-gambling-porn-social
alternates/fakenews-gambling-social
alternates/fakenews-porn
alternates/fakenews-porn-social
alternates/fakenews-social
alternates/gambling
alternates/gambling-porn
alternates/gambling-porn-social
alternates/gambling-social
alternates/porn
alternates/porn-social
alternates/social
"
lists="
data/Adguard-cname
data/Badd-Boyz-Hosts
data/KADhosts
data/MetaMask
data/StevenBlack
data/URLHaus
data/UncheckyAds
data/adaway.org
data/add.2o7Net
data/add.Dead
data/add.Risk
data/add.Spam
data/hostsVN
data/minecraft-hosts
data/mvps.org
data/shady-hosts
data/someonewhocares.org
data/tiuxo
data/yoyo.org
extensions/fakenews
extensions/gambling
extensions/porn/brijrajparmar27
extensions/porn/clefspeare13
extensions/porn/sinfonietta
extensions/porn/sinfonietta-snuff
extensions/porn/tiuxo
extensions/social/sinfonietta
extensions/social/tiuxo
"
IFS='
'
for item in $lists
do
echo -n "" > $item/stats.out
for HASH_DATE in $(git log --reverse --format="%t,%as" -- $item)
do
# echo $item $HASH_DATE
IFS=" "
split=(${HASH_DATE//,/ })
git checkout ${split[0]} ${item}/hosts 1> /dev/null 2> /dev/null
domains=$(rh -q -m $item/hosts)
echo $item ${split[1]} ${domains}
echo ${split[1]},${domains} >> ${item}/stats.out
IFS='
'
done
git checkout HEAD^ ${item}/hosts 1> /dev/null 2> /dev/null
done