summaryrefslogtreecommitdiffstats
path: root/build.sh
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-09-03 08:11:13 -0300
committerRenato Botelho <renato@netgate.com>2015-09-03 08:11:13 -0300
commitf238a83f3f559d31c56caafec3923d2f722ec307 (patch)
tree561c1ee8cd8255a1b1a3dc00f0cd11f92c68dea3 /build.sh
parentab54d7171f5d469ddbaea5211d0d5693f1c96984 (diff)
downloadpfsense-f238a83f3f559d31c56caafec3923d2f722ec307.zip
pfsense-f238a83f3f559d31c56caafec3923d2f722ec307.tar.gz
Simplify check for mandatory variables
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh26
1 files changed, 7 insertions, 19 deletions
diff --git a/build.sh b/build.sh
index d310ce2..8cd1add 100755
--- a/build.sh
+++ b/build.sh
@@ -288,25 +288,13 @@ if [ "${BUILDACTION}" != "images" ]; then
fi
if [ -n "${SNAPSHOTS}" -a -z "${DO_NOT_UPLOAD}" ]; then
- if [ -z "${RSYNCIP}" ]; then
- echo ">>> ERROR: RSYNCIP is not defined"
- exit 1
- fi
-
- if [ -z "${RSYNCUSER}" ]; then
- echo ">>> ERROR: RSYNCUSER is not defined"
- exit 1
- fi
-
- if [ -z "${RSYNCPATH}" ]; then
- echo ">>> ERROR: RSYNCPATH is not defined"
- exit 1
- fi
-
- if [ -z "${RSYNCLOGS}" ]; then
- echo ">>> ERROR: RSYNCLOGS is not defined"
- exit 1
- fi
+ for _var in RSYNCIP RSYNCUSER RSYNCPATH RSYNCLOGS; do
+ eval "_value=\${$_var}"
+ if [ -z "${_value}" ]; then
+ echo ">>> ERROR: ${_var} is not defined"
+ exit 1
+ fi
+ done
fi
if [ $# -gt 1 ]; then
OpenPOWER on IntegriCloud