diff --git a/Config.in b/Config.in index 2500bc5..3fabd8a 100644 --- a/Config.in +++ b/Config.in @@ -26,14 +26,19 @@ menu "--- BOOK Settings" bool "Beyond Linux From Scratch" endchoice + config PROGNAME + string + default "lfs" if BOOK_LFS + default "clfs" if BOOK_CLFS + default "clfs2" if BOOK_CLFS2 +# default "clfs3" if BOOK_CLFS3 + default "hlfs" if BOOK_HLFS + default "blfs" if BOOK_BLFS + config RUN_ME string - default "./lfs" if BOOK_LFS - default "./clfs" if BOOK_CLFS - default "./clfs2" if BOOK_CLFS2 -# default "./clfs3" if BOOK_CLFS3 - default "./hlfs" if BOOK_HLFS - default "./blfs" if BOOK_BLFS + default "./jhalfs run" if !BOOK_BLFS + default "./blfs-tool" if BOOK_BLFS #--- End BOOK/script #--- Book version diff --git a/blfs b/blfs-tool similarity index 99% rename from blfs rename to blfs-tool index 3622066..f6d141f 100755 --- a/blfs +++ b/blfs-tool @@ -64,9 +64,8 @@ trap 'echo -e "\n\n${RED}INTERRUPT${OFF} trapped\n" && exit 2' 1 2 3 15 17 18 #>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # envars not sourced from configuration file - PROGNAME=$(basename $0) COMMON_DIR="common" - VERBOSITY=1 +VERBOSITY=1 [[ $VERBOSITY > 0 ]] && echo -n "Loading config params from ..." source configuration diff --git a/clfs b/clfs deleted file mode 120000 index fba0373..0000000 --- a/clfs +++ /dev/null @@ -1 +0,0 @@ -master.sh \ No newline at end of file diff --git a/clfs2 b/clfs2 deleted file mode 120000 index fba0373..0000000 --- a/clfs2 +++ /dev/null @@ -1 +0,0 @@ -master.sh \ No newline at end of file diff --git a/common/common-functions b/common/common-functions index d63f79f..4ca754f 100644 --- a/common/common-functions +++ b/common/common-functions @@ -447,7 +447,7 @@ get_book() { # #----------------------------# cd $JHALFSDIR - if [ -z $WC ] ; then + if [ -z $WORKING_COPY ] ; then # Check for Subversion instead of just letting the script hit 'svn' and fail. test `type -p svn` || eval "echo \"This feature requires Subversion.\" exit 1" diff --git a/hlfs b/hlfs deleted file mode 120000 index fba0373..0000000 --- a/hlfs +++ /dev/null @@ -1 +0,0 @@ -master.sh \ No newline at end of file diff --git a/master.sh b/jhalfs similarity index 91% rename from master.sh rename to jhalfs index b6e7c84..d0488f6 100755 --- a/master.sh +++ b/jhalfs @@ -74,18 +74,16 @@ ${BOLD} \"jhalfs-X\"${OFF} builder tool (experimental) \$Rev$ ${BOLD}Gnu General Public License, Version 2.${OFF} " -if [ ! -L $0 ] ; then - echo "$version" - echo "${nl_}${tab_}${BOLD}${RED}This script cannot be called directly: EXITING ${OFF}${nl_}" - exit 1 -fi - - PROGNAME=$(basename $0) - COMMON_DIR="common" -PACKAGE_DIR=$(echo $PROGNAME | tr [a-z] [A-Z]) - MODULE=$PACKAGE_DIR/master.sh - VERBOSITY=1 +case $1 in + -v ) echo "$version" && exit 1 ;; + run ) : ;; + * ) + echo "${nl_}${tab_}${BOLD}${RED}This script cannot be called directly: EXITING ${OFF}${nl_}" + exit 1 + ;; +esac +VERBOSITY=1 [[ $VERBOSITY > 0 ]] && echo -n "Loading config params from ..." source configuration @@ -128,6 +126,7 @@ if [[ ! -z ${BRANCH_ID} ]]; then ;; esac fi + # These are boolean vars generated from Config.in. # ISSUE: If a boolean parameter is not set that # variable is not defined by the menu app. This can @@ -147,6 +146,14 @@ VIMLANG=${VIMLANG:-n} KEYMAP=${KEYMAP:=none} GRSECURITY_HOST=${GRSECURITY_HOST:-n} +# Set the document location... +BOOK=${BOOK:=$PROGNAME-$LFSVRS} + +# Set true internal variables +COMMON_DIR="common" +PACKAGE_DIR=$(echo $PROGNAME | tr [a-z] [A-Z]) +MODULE=$PACKAGE_DIR/master.sh + [[ $VERBOSITY > 0 ]] && echo -n "Loading common-functions module..." source $COMMON_DIR/common-functions @@ -160,20 +167,6 @@ source $MODULE [[ $VERBOSITY > 0 ]] && echo "${SD_BORDER}${nl_}" -#=========================================================== -# If the var BOOK contains something then, maybe, it points -# to a working doc.. set WC=1, else 'null' -#=========================================================== -WC=${BOOK:+y} -#=========================================================== - -#=================================================== -# Set the document location... -#=================================================== -BOOK=${BOOK:=$PROGNAME-$LFSVRS} -#=================================================== - - #*******************************************************************# [[ $VERBOSITY > 0 ]] && echo -n "Loading function ..." source $COMMON_DIR/func_check_version.sh diff --git a/lfs b/lfs deleted file mode 120000 index fba0373..0000000 --- a/lfs +++ /dev/null @@ -1 +0,0 @@ -master.sh \ No newline at end of file