summaryrefslogtreecommitdiff
path: root/check.sh
diff options
context:
space:
mode:
Diffstat (limited to 'check.sh')
-rwxr-xr-xcheck.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/check.sh b/check.sh
index fe96b1c..9e84cc7 100755
--- a/check.sh
+++ b/check.sh
@@ -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