summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid C Wang <dcwangmit01@gmail.com>2017-03-01 21:56:51 +0000
committerXECDesign <XECDesign@users.noreply.github.com>2017-03-06 11:56:12 +0000
commit40b5af925b8b00d2bd383358a4aa013c3367abc9 (patch)
tree5704bafcb085696a5425e948401b32c95aefa60b
parent7748ed0df1b311ac12dbffb1c52f50317c1851bf (diff)
Enable pi-gen build when "pi-gen/work" dir is a symlink
* Occasionally, it is necessary to symbolically link the pi-gen/work directory to a different place on the filesystem. This is true if the current partition is low on space, or when building within vagrant virtual machine shared mounts which do not support all regular fs operations. * Without this change, the pi-gen build will fail to unmount because the OS 'mount' command returns canonical paths which fails to match the symbolically linked path to 'work' dir.
-rwxr-xr-xbuild.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index 2656be8..72c566d 100755
--- a/build.sh
+++ b/build.sh
@@ -132,7 +132,7 @@ export IMG_DATE=${IMG_DATE:-"$(date -u +%Y-%m-%d)"}
export BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export SCRIPT_DIR="${BASE_DIR}/scripts"
-export WORK_DIR="${BASE_DIR}/work/${IMG_DATE}-${IMG_NAME}"
+export WORK_DIR=`readlink -f "${BASE_DIR}/work/${IMG_DATE}-${IMG_NAME}"`
export DEPLOY_DIR="${BASE_DIR}/deploy"
export LOG_FILE="${WORK_DIR}/build.log"