Added checks to prevent gen-makefile.sh be run from wrong directories.
This commit is contained in:
parent
d97b705bcc
commit
aecb378a83
1 changed files with 11 additions and 1 deletions
|
@ -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 .
|
||||
|
|
Reference in a new issue