diff --git a/Config.in b/Config.in index 9cd3504..a8235da 100644 --- a/Config.in +++ b/Config.in @@ -723,6 +723,9 @@ menu "--- General Settings" default "/mnt/build_dir" help #-- The directory where the created system will be located. + # NOTE: A working directory named jhalfs will be created + # here, so ensure this does not conflict with the jhalfs + # source directory. config GETPKG bool "Retrieve source files" diff --git a/jhalfs b/jhalfs index 964600d..7b4b4ac 100755 --- a/jhalfs +++ b/jhalfs @@ -119,6 +119,14 @@ SET_WARNINGS=${SET_WARNINGS:=n} SET_MISC=${SET_MISC:=n} SET_BLOWFISH=${SET_BLOWFISH:=n} +# Sanity check on the location of $BUILDDIR / $JHALFSDIR +CWD=$(cd `dirname $0` && pwd) +if [[ $JHALFSDIR == $CWD ]]; then + echo " The jhalfs source directory conflicts with the jhalfs build directory." + echo " Please move the source directory or change the build directory." + exit 2 +fi + # Book surces envars BRANCH_ID=${BRANCH_ID:=development}