r3179 - jhalfs/trunk/BLFS

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Wed Oct 11 12:35:36 PDT 2006


Author: manuel
Date: 2006-10-11 13:35:34 -0600 (Wed, 11 Oct 2006)
New Revision: 3179

Modified:
   jhalfs/trunk/BLFS/gen-makefile.sh
Log:
Added checks to prevent gen-makefile.sh be run from wrong directories.

Modified: jhalfs/trunk/BLFS/gen-makefile.sh
===================================================================
--- jhalfs/trunk/BLFS/gen-makefile.sh	2006-10-09 21:25:07 UTC (rev 3178)
+++ jhalfs/trunk/BLFS/gen-makefile.sh	2006-10-11 19:35:34 UTC (rev 3179)
@@ -10,7 +10,7 @@
 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 @@
 
 }
 
+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 .




More information about the alfs-log mailing list