summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeander <lcvandinteren@gmail.com>2019-11-18 14:32:16 +0100
committerXECDesign <XECDesign@users.noreply.github.com>2019-11-18 13:32:16 +0000
commit7f143a185e891055ef2580b68750ade8c7cdaad5 (patch)
tree1f837a6562b57858be5319698242c65c4d0121b2
parenta449c75facc8b373eab7cf4f884f5a3d45028478 (diff)
Export base directory before loading config file (#347)
-rwxr-xr-xbuild.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/build.sh b/build.sh
index a730e44..d93d4dc 100755
--- a/build.sh
+++ b/build.sh
@@ -122,6 +122,8 @@ if [ "$(id -u)" != "0" ]; then
exit 1
fi
+BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"}
+export BASE_DIR
if [ -f config ]; then
# shellcheck disable=SC1091
@@ -154,7 +156,6 @@ export IMG_DATE="${IMG_DATE:-"$(date +%Y-%m-%d)"}"
export IMG_FILENAME="${IMG_FILENAME:-"${IMG_DATE}-${IMG_NAME}"}"
export ZIP_FILENAME="${ZIP_FILENAME:-"image_${IMG_DATE}-${IMG_NAME}"}"
-BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export SCRIPT_DIR="${BASE_DIR}/scripts"
export WORK_DIR="${WORK_DIR:-"${BASE_DIR}/work/${IMG_DATE}-${IMG_NAME}"}"
export DEPLOY_DIR=${DEPLOY_DIR:-"${BASE_DIR}/deploy"}
@@ -179,8 +180,6 @@ export TIMEZONE_DEFAULT="${TIMEZONE_DEFAULT:-Europe/London}"
export GIT_HASH=${GIT_HASH:-"$(git rev-parse HEAD)"}
-export BASE_DIR
-
export CLEAN
export IMG_NAME
export APT_PROXY