Added checks to prevent gen-makefile.sh be run from wrong directories.

This commit is contained in:
Manuel Canales Esparcia 2006-10-11 19:35:34 +00:00
parent d97b705bcc
commit aecb378a83

View file

@ -10,7 +10,7 @@ declare PREV_PACKAGE=""
declare BUILD_SCRIPTS=scripts
declare TRACKING_DIR=tracking-dir
HEADER="# This file is automatically generated by jhalfs
HEADER="# This file is automatically generated by gen-makefile.sh
# YOU MAY NEED TO EDIT THIS FILE MANUALLY
#
# Generated on `date \"+%F %X %Z\"`"
@ -247,6 +247,16 @@ EOF
}
if [[ -e Config.in ]] ; then
echo -e "${BOLD}This script must be run from inside the target package directory.${WHITE}"
exit 1
fi
if [[ ! -d scripts ]] ; then
echo -e "\n\tNo ./scripts/ directory has been found.\n"
exit 1
fi
generate_Makefile
cp ../progress_bar.sh .