diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2019-02-10 22:37:12 -0500 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2019-02-10 23:13:06 -0500 |
commit | b31e025f25e4dfe20e6d4d0ee88a267cf2167264 (patch) | |
tree | b2b9e31fb4f3ba3a878f2fe95b7d9604fa96b3de /check.sh | |
parent | 869340952389eb41135e824e3f4c4d8c9bf1fe8b (diff) |
add 'sort-entries' script and non-uniform sort warning to 'check.sh'
Diffstat (limited to 'check.sh')
-rwxr-xr-x | check.sh | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -6,6 +6,10 @@ # notice and this notice are preserved. This file is offered as-is, # without any warranty. +readonly CSV_CHAR=':' +readonly SEP_CHAR='!' + + # Verify the blacklist entries are correctly formatted. bad_entries="$(egrep -v '^[^:]*:[^:]*:(sv|debian|parabola|fsf|fedora)?:[^:]*:.*$' *.txt)" @@ -21,3 +25,12 @@ if [[ ! -z "$unsourced" ]]; then printf "[citation needed]:\n\n%s\n" "$unsourced" >&2 exit 1 fi + + +# TODO: this could be removed someday - see note in 'sort-entries' script +unsortable="$(grep ${SEP_CHAR} *.txt)" + +if [[ ! -z "$unsortable" ]]; then + printf "[non-uniform sorting] entry contains '$s' char" ${SEP_CHAR} >&2 + exit 1 +fi |