summaryrefslogtreecommitdiffstats
path: root/ci/build.sh
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2018-11-01 13:19:50 +1030
committerJoel Stanley <joel@jms.id.au>2018-11-01 13:21:17 +1030
commitce8ae8d352c97f790e3f853fa5c93d2f4272ed1f (patch)
treeb7b2174c35eb1b954058fc793c22acb2fc892eb3 /ci/build.sh
parent95ec11828cc795a1b4dc61715c00e786bcbb5ec0 (diff)
downloadblackbird-op-build-ce8ae8d352c97f790e3f853fa5c93d2f4272ed1f.tar.gz
blackbird-op-build-ce8ae8d352c97f790e3f853fa5c93d2f4272ed1f.zip
ci: Fix environment variable check
The check for the variables were passing even tho they were not set, resulting in bad syntax in the docker file: ENV DL_DIR ENV CCACHE_DIR ' + docker build --network=host -t openpower/op-build-ubuntu1604 - Sending build context to Docker daemon 2.56kB Error response from daemon: ENV must have two arguments I am no bash guru; this test is what is recommended by the first hit on stackoverflow. Improve it if you know better. Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'ci/build.sh')
-rwxr-xr-xci/build.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/ci/build.sh b/ci/build.sh
index f663ef46..44852c68 100755
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -105,10 +105,10 @@ do
PROXY="RUN echo \"Acquire::http::Proxy \\"\"${http_proxy}/\\"\";\" > /etc/apt/apt.conf.d/000apt-cacher-ng-proxy"
fi
fi
- if [[ -n "DL_DIR" ]]; then
+ if [ ! -z ${DL_DIR+x} ]; then
DL_DIR_ENV="ENV DL_DIR $DL_DIR"
fi
- if [[ -n "CCACHE_DIR" ]]; then
+ if [ ! -z ${CCACHE_DIR+x} ]; then
CCACHE_DIR_ENV="ENV CCACHE_DIR $CCACHE_DIR"
fi
OpenPOWER on IntegriCloud