ci: Fix resetting CCACHE_DIR
CCACHE_DIR was being reset in build-all-defconfigs.sh.
Additionally, assign default values to variables we might be testing
from the environment, to shut-up any potential 'set -u' settings.
Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com>
diff --git a/ci/build-all-defconfigs.sh b/ci/build-all-defconfigs.sh
index 1b214d0..f21b847 100755
--- a/ci/build-all-defconfigs.sh
+++ b/ci/build-all-defconfigs.sh
@@ -7,7 +7,6 @@
SDK_ONLY=0
CONFIGTAG="_defconfig"
DEFCONFIGS=();
-CCACHE_DIR=""
SDK_DIR=""
opt=$(getopt -o 'o:Ss:p:r' -- "$@")
@@ -192,7 +191,7 @@
export SDK_DIR
}
-if [ -z "${PLATFORM_LIST}" ]; then
+if [ -z "${PLATFORM_LIST-}" ]; then
echo "Using all the defconfigs for all the platforms"
DEFCONFIGS=`(cd openpower/configs; ls -1 *_defconfig)`
else
@@ -203,14 +202,14 @@
done
fi
-if [ -z "$CCACHE_DIR" ]; then
+if [ -z "${CCACHE_DIR-}" ]; then
CCACHE_DIR=`pwd`/.op-build_ccache
fi
shopt -s expand_aliases
source op-build-env
-if [ -n "$DL_DIR" ]; then
+if [ -n "${DL_DIR-}" ]; then
unset BR2_DL_DIR
export BR2_DL_DIR=${DL_DIR}
fi