mirror of
https://github.com/columndeeply/hosts.git
synced 2025-10-27 11:31:09 -04:00
Check whitelist on merger.sh
This commit is contained in:
@ -4,6 +4,9 @@
|
||||
## sh merger.sh "*_clean"
|
||||
#
|
||||
|
||||
# If no parameters given exit
|
||||
[ $# -eq 0 ] && exit
|
||||
|
||||
# Remove temp file from previous runs if needed
|
||||
rm -f merged.tmp
|
||||
|
||||
@ -21,6 +24,10 @@ rm -f ../hosts*
|
||||
# Remove duplicates
|
||||
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 merged hosts -C 90MB -d
|
||||
|
||||
|
||||
Reference in New Issue
Block a user