Avoiding hardcoded supported books versions.
This commit is contained in:
parent
7785f91ead
commit
a6655ffd7d
6 changed files with 30 additions and 25 deletions
|
@ -68,6 +68,7 @@ XSL=clfs.xsl
|
|||
|
||||
#--- Book version
|
||||
LFSVRS=development
|
||||
TREE=trunk/BOOK
|
||||
|
||||
#--- Name of the makefile
|
||||
MKFILE=$JHALFSDIR/Makefile
|
||||
|
|
|
@ -38,6 +38,7 @@ XSL=hlfs.xsl
|
|||
|
||||
#--- Book version
|
||||
LFSVRS=development
|
||||
TREE=trunk/BOOK
|
||||
|
||||
#--- Name of the makefile
|
||||
MKFILE=$JHALFSDIR/Makefile
|
||||
|
|
|
@ -32,6 +32,7 @@ XSL=lfs.xsl
|
|||
|
||||
#--- Book version
|
||||
LFSVRS=development
|
||||
TREE=trunk/BOOK
|
||||
|
||||
#--- Name of the makefile
|
||||
MKFILE=$JHALFSDIR/Makefile
|
||||
|
|
|
@ -52,8 +52,12 @@ ${BOLD} -V, --version${OFF}
|
|||
|
||||
${BOLD} -B, --book VER${OFF}
|
||||
use VER version of the book as the system to build.
|
||||
Supported versions are: dev*, trunk, SVN
|
||||
These are aliases for the Development version of {C,H}LFS
|
||||
Supported VER values are:
|
||||
dev*, trunk, SVN = aliases for the Development version of {C,H}LFS
|
||||
branch-NAME = a branch of name NAME
|
||||
VERSION = the version of a stable released book
|
||||
To know what branches and stable books works with this version of jhalfs
|
||||
please see http://wiki.linuxfromscratch.org/alfs/wiki/SupportedBooks
|
||||
|
||||
${BOLD} -D --directory DIR${OFF}
|
||||
use DIR directory for building ${BOLD}$(echo $PROGNAME | tr [a-z] [A-Z])${OFF}; all files jhalfs produces
|
||||
|
@ -667,10 +671,7 @@ get_book() { #
|
|||
extract_commands
|
||||
fi
|
||||
else
|
||||
case $LFSVRS in
|
||||
development)
|
||||
svn co $SVN/${svn_root}/trunk/BOOK ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1 ;;
|
||||
esac
|
||||
svn co $SVN/${svn_root}/${TREE} ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1
|
||||
echo -ne "done\n"
|
||||
extract_commands
|
||||
fi
|
||||
|
|
|
@ -216,7 +216,7 @@ inline_doc
|
|||
BOOK) if [[ "${WC}" = "1" ]] ; then
|
||||
validate_dir -z -d
|
||||
else
|
||||
validate_against_str "x${PROGNAME}-developmentx"
|
||||
validate_against_str "x${PROGNAME}-${LFSVRS}x"
|
||||
fi ;;
|
||||
|
||||
# Validate directories, testable states:
|
||||
|
|
31
master.sh
31
master.sh
|
@ -105,22 +105,23 @@ while test $# -gt 0 ; do
|
|||
case $1 in
|
||||
dev* | SVN | trunk )
|
||||
LFSVRS=development
|
||||
TREE=trunk/BOOK
|
||||
;;
|
||||
*) if [[ "$PROGNAME" = "lfs" ]]; then
|
||||
case $1 in
|
||||
6.1.1 )
|
||||
echo "For stable 6.1.1 book, please use jhalfs-0.2."
|
||||
exit 0
|
||||
;;
|
||||
* )
|
||||
echo "$1 is an unsupported version at this time."
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo "The requested version, ${L_arrow} ${BOLD}$1${OFF} ${R_arrow}, is undefined in the ${BOLD}$(echo $PROGNAME | tr [a-z] [A-Z])${OFF} series."
|
||||
exit 0
|
||||
fi
|
||||
branch-* )
|
||||
LFSVRS=$1
|
||||
TREE=branches/${1#branch-}/BOOK
|
||||
;;
|
||||
* )
|
||||
case $PROGNAME in
|
||||
lfs | hlfs )
|
||||
LFSVRS=$1
|
||||
TREE=tags/$1/BOOK
|
||||
;;
|
||||
clfs )
|
||||
LFSVRS=$1
|
||||
TREE=tags/$1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
|
Reference in a new issue