disposable-email-domains/maintain.sh
Hollow Man 717f7f7ab2
Add a shell script for maintaining disposable_email_blocklist.conf (#263)
* Add more instructions for contributing so that the right order can always be achieved.

LC_ALL=C; export LC_ALL

Signed-off-by: Hollow Man <hollowman@hollowman.ml>

* Add a shell script for maintaining disposable_email_blocklist.conf

Signed-off-by: Hollow Man <hollowman@hollowman.ml>

* Remove redundant lines in README.md

Signed-off-by: Hollow Man <hollowman@hollowman.ml>
2021-02-25 23:10:35 -06:00

13 lines
395 B
Bash

#!/bin/bash
# Unify locale settings temporarily to make sort produce the same order
LC_ALL=C
export LC_ALL
# Converts uppercase to lowercase, sorts, removes duplicates and removes allowlisted domains
cat disposable_email_blocklist.conf | tr '[:upper:]' '[:lower:]' | sort -f | uniq -i > temp.conf
comm -23 temp.conf allowlist.conf > disposable_email_blocklist.conf
rm temp.conf
echo "Done!"