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
|
#--- Book version
|
||||||
LFSVRS=development
|
LFSVRS=development
|
||||||
|
TREE=trunk/BOOK
|
||||||
|
|
||||||
#--- Name of the makefile
|
#--- Name of the makefile
|
||||||
MKFILE=$JHALFSDIR/Makefile
|
MKFILE=$JHALFSDIR/Makefile
|
||||||
|
|
|
@ -38,6 +38,7 @@ XSL=hlfs.xsl
|
||||||
|
|
||||||
#--- Book version
|
#--- Book version
|
||||||
LFSVRS=development
|
LFSVRS=development
|
||||||
|
TREE=trunk/BOOK
|
||||||
|
|
||||||
#--- Name of the makefile
|
#--- Name of the makefile
|
||||||
MKFILE=$JHALFSDIR/Makefile
|
MKFILE=$JHALFSDIR/Makefile
|
||||||
|
|
|
@ -32,6 +32,7 @@ XSL=lfs.xsl
|
||||||
|
|
||||||
#--- Book version
|
#--- Book version
|
||||||
LFSVRS=development
|
LFSVRS=development
|
||||||
|
TREE=trunk/BOOK
|
||||||
|
|
||||||
#--- Name of the makefile
|
#--- Name of the makefile
|
||||||
MKFILE=$JHALFSDIR/Makefile
|
MKFILE=$JHALFSDIR/Makefile
|
||||||
|
|
|
@ -52,8 +52,12 @@ ${BOLD} -V, --version${OFF}
|
||||||
|
|
||||||
${BOLD} -B, --book VER${OFF}
|
${BOLD} -B, --book VER${OFF}
|
||||||
use VER version of the book as the system to build.
|
use VER version of the book as the system to build.
|
||||||
Supported versions are: dev*, trunk, SVN
|
Supported VER values are:
|
||||||
These are aliases for the Development version of {C,H}LFS
|
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}
|
${BOLD} -D --directory DIR${OFF}
|
||||||
use DIR directory for building ${BOLD}$(echo $PROGNAME | tr [a-z] [A-Z])${OFF}; all files jhalfs produces
|
use DIR directory for building ${BOLD}$(echo $PROGNAME | tr [a-z] [A-Z])${OFF}; all files jhalfs produces
|
||||||
|
@ -653,7 +657,7 @@ get_book() { #
|
||||||
test -d $JHALFSDIR/${PROGNAME}-commands && \
|
test -d $JHALFSDIR/${PROGNAME}-commands && \
|
||||||
test -f $JHALFSDIR/pkg_tarball_list ; then
|
test -f $JHALFSDIR/pkg_tarball_list ; then
|
||||||
# Set the canonical book version
|
# Set the canonical book version
|
||||||
echo -ne "done\n"
|
echo -ne "done\n"
|
||||||
cd $JHALFSDIR
|
cd $JHALFSDIR
|
||||||
case $PROGNAME in
|
case $PROGNAME in
|
||||||
clfs)
|
clfs)
|
||||||
|
@ -667,10 +671,7 @@ get_book() { #
|
||||||
extract_commands
|
extract_commands
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
case $LFSVRS in
|
svn co $SVN/${svn_root}/${TREE} ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1
|
||||||
development)
|
|
||||||
svn co $SVN/${svn_root}/trunk/BOOK ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1 ;;
|
|
||||||
esac
|
|
||||||
echo -ne "done\n"
|
echo -ne "done\n"
|
||||||
extract_commands
|
extract_commands
|
||||||
fi
|
fi
|
||||||
|
@ -679,7 +680,7 @@ get_book() { #
|
||||||
echo -ne "Using $BOOK as book's sources ...\n"
|
echo -ne "Using $BOOK as book's sources ...\n"
|
||||||
extract_commands
|
extract_commands
|
||||||
fi
|
fi
|
||||||
echo -ne " Document version ${L_arrow}${BOLD}${VERSION}${R_arrow}\n"
|
echo -ne " Document version ${L_arrow}${BOLD}${VERSION}${R_arrow}\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
#----------------------------#
|
#----------------------------#
|
||||||
|
@ -692,7 +693,7 @@ extract_commands() { #
|
||||||
|
|
||||||
cd $JHALFSDIR
|
cd $JHALFSDIR
|
||||||
case $PROGNAME in
|
case $PROGNAME in
|
||||||
clfs)
|
clfs)
|
||||||
VERSION=$(xmllint --noent $BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
VERSION=$(xmllint --noent $BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
||||||
*)
|
*)
|
||||||
VERSION=$(xmllint --noent $BOOK/prologue/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
VERSION=$(xmllint --noent $BOOK/prologue/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
||||||
|
|
|
@ -216,7 +216,7 @@ inline_doc
|
||||||
BOOK) if [[ "${WC}" = "1" ]] ; then
|
BOOK) if [[ "${WC}" = "1" ]] ; then
|
||||||
validate_dir -z -d
|
validate_dir -z -d
|
||||||
else
|
else
|
||||||
validate_against_str "x${PROGNAME}-developmentx"
|
validate_against_str "x${PROGNAME}-${LFSVRS}x"
|
||||||
fi ;;
|
fi ;;
|
||||||
|
|
||||||
# Validate directories, testable states:
|
# Validate directories, testable states:
|
||||||
|
|
31
master.sh
31
master.sh
|
@ -105,22 +105,23 @@ while test $# -gt 0 ; do
|
||||||
case $1 in
|
case $1 in
|
||||||
dev* | SVN | trunk )
|
dev* | SVN | trunk )
|
||||||
LFSVRS=development
|
LFSVRS=development
|
||||||
|
TREE=trunk/BOOK
|
||||||
;;
|
;;
|
||||||
*) if [[ "$PROGNAME" = "lfs" ]]; then
|
branch-* )
|
||||||
case $1 in
|
LFSVRS=$1
|
||||||
6.1.1 )
|
TREE=branches/${1#branch-}/BOOK
|
||||||
echo "For stable 6.1.1 book, please use jhalfs-0.2."
|
;;
|
||||||
exit 0
|
* )
|
||||||
;;
|
case $PROGNAME in
|
||||||
* )
|
lfs | hlfs )
|
||||||
echo "$1 is an unsupported version at this time."
|
LFSVRS=$1
|
||||||
exit 0
|
TREE=tags/$1/BOOK
|
||||||
;;
|
;;
|
||||||
esac
|
clfs )
|
||||||
else
|
LFSVRS=$1
|
||||||
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."
|
TREE=tags/$1
|
||||||
exit 0
|
;;
|
||||||
fi
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
Reference in a new issue