Added config name check to prevent docker name errors after build.
authorEric Hoxworth <eric@schoolzilla.com>
Fri, 8 May 2015 15:04:30 +0000 (10:04 -0500)
committerEric Hoxworth <eric@schoolzilla.com>
Fri, 8 May 2015 15:04:30 +0000 (10:04 -0500)
launcher

index 57f034bedda2a30efd6ff1012830bfa6b2f18263..2d47ff2d6d8434254c68abec8426eee276ed8ff2 100755 (executable)
--- a/launcher
+++ b/launcher
@@ -4,6 +4,16 @@ command=$1
 config=$2
 opt=$3
 
+# 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/ !@#$%^&*()+~`=]'
+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
+    exit 1
+fi
+
 cd "$(dirname "$0")"
 
 docker_min_version='1.2.0'