Make launcher work with french locale (among others) (#395)
authorMichael Scherer <mscherer@users.noreply.github.com>
Mon, 30 Jul 2018 06:21:25 +0000 (08:21 +0200)
committerSam <sam.saffron@gmail.com>
Mon, 30 Jul 2018 06:21:25 +0000 (16:21 +1000)
On several locales others than C, A-Z might match more than A to Z, due
to different collation order.

See https://unix.stackexchange.com/questions/227070/why-does-a-z-match-lowercase-letters-in-bash
for explanation.

launcher

index a8e50da58175cc91dac69f8d43f23f22d40779dc..f34acc9b94778cc4904a389bcdc4c58c4dd4da0b 100755 (executable)
--- a/launcher
+++ b/launcher
@@ -45,11 +45,11 @@ while [ ${#} -gt 0 ]; do
 done
 
 # Docker doesn't like uppercase characters, spaces or special characters, catch it now before we build everything out and then find out
-re='[A-Z/ !@#$%^&*()+~`=]'
+re='[[:upper:]/ !@#$%^&*()+~`=]'
 if [[ $config =~ $re ]];
   then
     echo
-    echo "ERROR: Config name must not contain upper case characters, spaces or special characters. Correct config name and rerun $0."
+    echo "ERROR: Config name '$config' must not contain upper case characters, spaces or special characters. Correct config name and rerun $0."
     echo
     exit 1
 fi