diff options
author | Brett Randall <javabrett@gmail.com> | 2017-08-04 12:10:27 +1000 |
---|---|---|
committer | Manuel Rüger <manuel@rueg.eu> | 2017-08-20 12:17:06 +0200 |
commit | 84b1e3aff9bf3e34019a5b1ef326ebe256051908 (patch) | |
tree | c31c7eb83c23bbfcbf2083969e56818b91dd5348 | |
parent | A couple of rename fixes: stage- -> stage3-. (diff) | |
download | docker-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-x | build.sh | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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}" |