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.
|
# sources.
|
||||||
if [ -d ${PROGNAME}-$LFSVRS ] ; then
|
if [ -d ${PROGNAME}-$LFSVRS ] ; then
|
||||||
cd ${PROGNAME}-$LFSVRS
|
cd ${PROGNAME}-$LFSVRS
|
||||||
if LC_ALL=C svn up | grep -q At && test -d $JHALFSDIR/${PROGNAME}-commands && \
|
if LC_ALL=C svn up | grep -q At && \
|
||||||
test -f $JHALFSDIR/pkg_tarball_list ; then
|
test -d $JHALFSDIR/${PROGNAME}-commands && \
|
||||||
echo -ne "done\n"
|
test -f $JHALFSDIR/pkg_tarball_list ; then
|
||||||
# Set the canonical book version
|
# Set the canonical book version
|
||||||
|
echo -ne "done\n"
|
||||||
cd $JHALFSDIR
|
cd $JHALFSDIR
|
||||||
VERSION=`grep "ENTITY version " $BOOK/general.ent | sed 's@<!ENTITY version "@@;s@">@@'`
|
case $PROGNAME in
|
||||||
# Another work-around, clfs book has a x.x.x-date versioning system
|
clfs)
|
||||||
if [ "$PROGNAME" = "clfs" ]; then
|
VERSION=$(xmllint --noent $BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
||||||
VERSION=${VERSION##*-}
|
*)
|
||||||
fi
|
VERSION=$(xmllint --noent $BOOK/prologue/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
||||||
|
esac
|
||||||
get_sources
|
get_sources
|
||||||
else
|
else
|
||||||
echo -ne "done\n"
|
echo -ne "done\n"
|
||||||
|
@ -603,10 +605,12 @@ get_book() { #
|
||||||
echo -ne "done\n"
|
echo -ne "done\n"
|
||||||
extract_commands
|
extract_commands
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
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"
|
||||||
}
|
}
|
||||||
|
|
||||||
#----------------------------#
|
#----------------------------#
|
||||||
|
@ -618,11 +622,12 @@ extract_commands() { #
|
||||||
exit 1"
|
exit 1"
|
||||||
|
|
||||||
cd $JHALFSDIR
|
cd $JHALFSDIR
|
||||||
VERSION=`grep "ENTITY version " $BOOK/general.ent | sed 's@<!ENTITY version "@@;s@">@@'`
|
case $PROGNAME in
|
||||||
# Another work-around, clfs book has a x.x.x-date versioning system
|
clfs)
|
||||||
if [ "$PROGNAME" = "clfs" ]; then
|
VERSION=$(xmllint --noent $BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
||||||
VERSION=${VERSION##*-}
|
*)
|
||||||
fi
|
VERSION=$(xmllint --noent $BOOK/prologue/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Start clean
|
# Start clean
|
||||||
if [ -d ${PROGNAME}-commands ]; then
|
if [ -d ${PROGNAME}-commands ]; then
|
||||||
|
|
Reference in a new issue