Reworked book extraction code.. will handle future changes
This commit is contained in:
parent
a2c9b41661
commit
1ff67686df
1 changed files with 18 additions and 13 deletions
|
@ -580,16 +580,18 @@ get_book() { #
|
|||
# sources.
|
||||
if [ -d ${PROGNAME}-$LFSVRS ] ; then
|
||||
cd ${PROGNAME}-$LFSVRS
|
||||
if LC_ALL=C svn up | grep -q At && test -d $JHALFSDIR/${PROGNAME}-commands && \
|
||||
test -f $JHALFSDIR/pkg_tarball_list ; then
|
||||
echo -ne "done\n"
|
||||
if LC_ALL=C svn up | grep -q At && \
|
||||
test -d $JHALFSDIR/${PROGNAME}-commands && \
|
||||
test -f $JHALFSDIR/pkg_tarball_list ; then
|
||||
# Set the canonical book version
|
||||
echo -ne "done\n"
|
||||
cd $JHALFSDIR
|
||||
VERSION=`grep "ENTITY version " $BOOK/general.ent | sed 's@<!ENTITY version "@@;s@">@@'`
|
||||
# Another work-around, clfs book has a x.x.x-date versioning system
|
||||
if [ "$PROGNAME" = "clfs" ]; then
|
||||
VERSION=${VERSION##*-}
|
||||
fi
|
||||
case $PROGNAME in
|
||||
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/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
||||
esac
|
||||
get_sources
|
||||
else
|
||||
echo -ne "done\n"
|
||||
|
@ -603,10 +605,12 @@ get_book() { #
|
|||
echo -ne "done\n"
|
||||
extract_commands
|
||||
fi
|
||||
|
||||
else
|
||||
echo -ne "Using $BOOK as book's sources ...\n"
|
||||
extract_commands
|
||||
fi
|
||||
echo -ne " Document version ${L_arrow}${BOLD}${VERSION}${R_arrow}\n"
|
||||
}
|
||||
|
||||
#----------------------------#
|
||||
|
@ -618,11 +622,12 @@ extract_commands() { #
|
|||
exit 1"
|
||||
|
||||
cd $JHALFSDIR
|
||||
VERSION=`grep "ENTITY version " $BOOK/general.ent | sed 's@<!ENTITY version "@@;s@">@@'`
|
||||
# Another work-around, clfs book has a x.x.x-date versioning system
|
||||
if [ "$PROGNAME" = "clfs" ]; then
|
||||
VERSION=${VERSION##*-}
|
||||
fi
|
||||
case $PROGNAME in
|
||||
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/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
||||
esac
|
||||
|
||||
# Start clean
|
||||
if [ -d ${PROGNAME}-commands ]; then
|
||||
|
|
Reference in a new issue