From 22b81cf44f8fd3e7f512d4d2f1f05dfe2193a4d1 Mon Sep 17 00:00:00 2001 From: Braiden Vasco Date: Sun, 2 Jul 2017 13:18:10 +0000 Subject: [PATCH] Fix global variables --- build.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 0d90ed1..f44e849 100755 --- a/build.sh +++ b/build.sh @@ -1,12 +1,13 @@ #!/bin/bash -e -export IMG_DATE="$(date +%Y-%m-%d)" export BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" export SCRIPT_DIR="$BASE_DIR/scripts" export FUNCTIONS_DIR="$BASE_DIR/functions" -export WORK_DIR="$BASE_DIR/work/$IMG_DATE-$IMG_NAME" export DEPLOY_DIR="$BASE_DIR/deploy" +export IMG_DATE +export WORK_DIR + export CLEAN export IMG_NAME export HOSTNAME @@ -61,6 +62,9 @@ main() { exit 1 fi + IMG_DATE="$(date +%Y-%m-%d)" + WORK_DIR="$BASE_DIR/work/$IMG_DATE-$IMG_NAME" + mkdir -p "$WORK_DIR" run_base }