mirror of
https://github.com/columndeeply/hosts.git
synced 2025-10-28 12:01:08 -04:00
Check whitelist on merger.sh
This commit is contained in:
@ -4,6 +4,9 @@
|
|||||||
## sh merger.sh "*_clean"
|
## sh merger.sh "*_clean"
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# If no parameters given exit
|
||||||
|
[ $# -eq 0 ] && exit
|
||||||
|
|
||||||
# Remove temp file from previous runs if needed
|
# Remove temp file from previous runs if needed
|
||||||
rm -f merged.tmp
|
rm -f merged.tmp
|
||||||
|
|
||||||
@ -21,6 +24,10 @@ rm -f ../hosts*
|
|||||||
# Remove duplicates
|
# Remove duplicates
|
||||||
sort < merged.tmp | uniq > merged
|
sort < merged.tmp | uniq > merged
|
||||||
|
|
||||||
|
# Check whitelist and remove matches
|
||||||
|
comm -2 -3 merged ../whitelist > merged2
|
||||||
|
mv merged2 merged
|
||||||
|
|
||||||
# Split the merged file into 90MB chunks to avoid GitHub's limit
|
# Split the merged file into 90MB chunks to avoid GitHub's limit
|
||||||
split merged hosts -C 90MB -d
|
split merged hosts -C 90MB -d
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user