aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Randall <javabrett@gmail.com>2017-08-04 12:10:27 +1000
committerManuel Rüger <manuel@rueg.eu>2017-08-20 12:17:06 +0200
commit84b1e3aff9bf3e34019a5b1ef326ebe256051908 (patch)
treec31c7eb83c23bbfcbf2083969e56818b91dd5348
parentA couple of rename fixes: stage- -> stage3-. (diff)
downloaddocker-images-84b1e3aff9bf3e34019a5b1ef326ebe256051908.tar.gz
docker-images-84b1e3aff9bf3e34019a5b1ef326ebe256051908.tar.bz2
docker-images-84b1e3aff9bf3e34019a5b1ef326ebe256051908.zip
Build fail-fast with message if env TARGET is not set.
-rwxr-xr-xbuild.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/build.sh b/build.sh
index 80a7998..986ab81 100755
--- a/build.sh
+++ b/build.sh
@@ -4,6 +4,10 @@
# TARGET env variable.
# Example usage: TARGET=stage3-amd64 ./build.sh
+if [[ -z "$TARGET" ]]; then
+ echo "TARGET environment variable must be set e.g. TARGET=stage3-amd64."
+ exit 1
+fi
# Split the TARGET variable into three elements separated by hyphens
IFS=- read -r NAME ARCH SUFFIX <<< "${TARGET}"