Use sensible defaults
authorHeiko Schlittermann (JUMPER) <hs@schlittermann.de>
Mon, 15 Jun 2015 17:30:56 +0200
changeset 14 6a83ee58d034
parent 13 1fe49e314ec9
child 15 b9822060de6b
Use sensible defaults
build
run
--- a/build	Mon Jun 15 17:29:46 2015 +0200
+++ b/build	Mon Jun 15 17:30:56 2015 +0200
@@ -1,14 +1,18 @@
 #!/bin/bash
 
+set -e
 trap '[[ $SORRY ]] && echo "FAILED: $SORRY" >&2' EXIT
+
+# update the Dockerfiles for the platforms
 make -C platforms
-set -e
+
 test -d exim || {
     echo "exim src directory missing" >&2
     echo "try: git clone https://github.com/Exim/exim.git" >&2
     exit 1
 }
-for dockerfile in ${*:-platforms/*/Dockerfile}
+
+for dockerfile in $(find "${@-platforms}" -name Dockerfile)
 do
     context=${dockerfile%/*}
     system=${context#*/}
--- a/run	Mon Jun 15 17:29:46 2015 +0200
+++ b/run	Mon Jun 15 17:30:56 2015 +0200
@@ -1,3 +1,6 @@
 #!/bin/bash
-platform=${1?platform}; shift
+
+platform=$(basename ${1?platform})
+shift
+
 docker run --hostname foo.site -i -t eximtest/$platform "$@"