Export base directory before loading config file to allow using base dir within config
This commit is contained in:
parent
a449c75fac
commit
62dfdd85d4
2
build.sh
2
build.sh
|
@ -122,6 +122,7 @@ if [ "$(id -u)" != "0" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
export BASE_DIR=${BASE_DIR:-"$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"}
|
||||
|
||||
if [ -f config ]; then
|
||||
# shellcheck disable=SC1091
|
||||
|
@ -154,7 +155,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"}
|
||||
|
|
Loading…
Reference in New Issue
Block a user