From 38ae01f61f17063e925b7c1253ca8454ad2c03cc Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Fri, 14 Sep 2007 16:56:24 +0000 Subject: [PATCH] Be sure that JHALFSDIR is not set to the jhalfs sources directory. Thanks to Dan Nicholson for the patch. --- Config.in | 3 +++ jhalfs | 8 ++++++++ 2 files changed, 11 insertions(+) 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}