jhalfs: rebuild-makefile. take VERSION from prbook

When rebuilding the Makefile, we should have prbook.xml in
ĴHALFSDIR. Use it to get VERSION (from lfs-release).
This commit is contained in:
Pierre Labastie 2021-10-14 10:25:48 +02:00
parent 4c32ca80bd
commit ee96ad26f9

11
jhalfs
View file

@ -478,16 +478,7 @@ if [[ "$REBUILD_MAKEFILE" = "y" ]] ; then
clfs* )
VERSION=$(xmllint --noent "$BOOK/prologue/$ARCH/bookinfo.xml" 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
lfs)
version_is_in=general.ent
if [ -x $BOOK/git-version.sh ]; then
( cd $BOOK && ./git-version.sh )
version_is_in=version.ent
fi
if [[ "$INITSYS" = "sysv" ]] ; then
VERSION=$(grep 'ENTITY version ' "$BOOK/$version_is_in" | cut -d\" -f2)
else
VERSION=$(grep 'ENTITY versiond' "$BOOK/$version_is_in" | cut -d\" -f2)
fi
VERSION=$(grep 'echo.*lfs-release' "$JHALFSDIR/prbook.xml" | sed 's/.*echo[ ]*\([^ ]*\).*/\1/')
;;
*)
VERSION=$(xmllint --noent "$BOOK/prologue/bookinfo.xml" 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;