jhalfs: manage version.ent vs general.ent

Old commits do not have git-version.sh, so version.ent cannot be generated
and general.ent has to be used
This commit is contained in:
Pierre Labastie 2021-05-01 17:26:37 +02:00
parent 34c47bef04
commit 380c2c619a

9
jhalfs
View file

@ -476,10 +476,15 @@ if [[ "$REBUILD_MAKEFILE" = "y" ]] ; then
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/<\/.*//') ;;
lfs) 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 if [[ "$INITSYS" = "sysv" ]] ; then
VERSION=$(grep 'ENTITY version ' "$BOOK/general.ent" | cut -d\" -f2) VERSION=$(grep 'ENTITY version ' "$BOOK/$version_is_in" | cut -d\" -f2)
else else
VERSION=$(grep 'ENTITY versiond' "$BOOK/general.ent" | cut -d\" -f2) VERSION=$(grep 'ENTITY versiond' "$BOOK/$version_is_in" | cut -d\" -f2)
fi fi
;; ;;
*) *)