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.
pull/52/head
David C Wang 2017-03-01 21:56:51 +00:00
parent 8f017cb69a
commit 25b50e38d5
1 changed files with 1 additions and 1 deletions

View File

@ -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"