Fix global variables
This commit is contained in:
parent
db5a3865f2
commit
22b81cf44f
1 changed files with 6 additions and 2 deletions
8
build.sh
8
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
|
||||
}
|
||||
|
|
Reference in a new issue