trille: make search for hints files saner
authorAdam D. Barratt <adam@adam-barratt.org.uk>
Sat, 18 Feb 2012 17:42:35 +0000 (17:42 +0000)
committerAdam D. Barratt <adam@adam-barratt.org.uk>
Sat, 18 Feb 2012 17:42:35 +0000 (17:42 +0000)
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
trille/get-hint-files

index 31d66d2..00d97b1 100755 (executable)
@@ -1,4 +1,8 @@
 #!/bin/sh
 
-find ~release/britney/hints -maxdepth 1 -type f -a \! -iname '.*.swp' -a \! -iname '*.html' -a \! -iname 'README' -a \! -iname '#*' -printf "%f\n"
+# LC_ALL to ensure that [a-z] only matches lower-case
+#
+# We assume that account names only include lower-case and numbers
+# The hyphen is included to allow "freeze-exception" to be matched
+LC_ALL=C find /home/release/britney/hints/ -maxdepth 1 -type f -a -regex '^.*/[a-z0-9-]+$' -printf "%f\n"