Be sure that $BUILDDIR is clean and usable.

This commit is contained in:
Manuel Canales Esparcia 2005-11-17 19:16:55 +00:00
parent 96b9b69afb
commit 4618749fab

21
jhalfs
View file

@ -81,6 +81,18 @@ Options:
help="\ help="\
Try '$0 --help' for more information." Try '$0 --help' for more information."
no_empty_builddir="\
echo \"\" >&2
echo \" W A R N I N G\" >&2
echo \"\" >&2
echo \"Look like the \$BUILDDIR directory contains subdirectories\" >&2
echo \"from a previous LFS build.\" >&2
echo \"\" >&2
echo \"Please, format the partition mounted on \$BUILDDIR or set\" >&2
echo \"a diferent build directory before to run jhalfs.\" >&2
echo \"\" >&2
exit 1"
exit_missing_arg="\ exit_missing_arg="\
echo \"Option '\$1' requires an argument\" >&2 echo \"Option '\$1' requires an argument\" >&2
echo \"\$help\" >&2 echo \"\$help\" >&2
@ -90,7 +102,6 @@ no_dl_client="\
echo \"Could not find a way to download the LFS sources.\" >&2 echo \"Could not find a way to download the LFS sources.\" >&2
echo \"Attempting to continue.\" >&2" echo \"Attempting to continue.\" >&2"
HEADER="# This file is automatically generated by jhalfs HEADER="# This file is automatically generated by jhalfs
# DO NOT EDIT THIS FILE MANUALLY # DO NOT EDIT THIS FILE MANUALLY
# #
@ -1009,6 +1020,14 @@ while test $# -gt 0 ; do
shift shift
done done
# If $BUILDDIR have subdirectories like tools/ or bin/, stop the run
# and notify the user about that. This also prevent to set "-d /"
# by mistake.
if [ -d $BUILDDIR/tools -o -d $BUILDDIR/bin ] ; then
eval "$no_empty_builddir"
fi
# Find the download client to use, if not already specified. # Find the download client to use, if not already specified.
if [ -z $DL ] ; then if [ -z $DL ] ; then