diff --git a/jhalfs b/jhalfs index a380e70..a82d6e5 100755 --- a/jhalfs +++ b/jhalfs @@ -476,10 +476,15 @@ 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/general.ent" | cut -d\" -f2) + VERSION=$(grep 'ENTITY version ' "$BOOK/$version_is_in" | cut -d\" -f2) else - VERSION=$(grep 'ENTITY versiond' "$BOOK/general.ent" | cut -d\" -f2) + VERSION=$(grep 'ENTITY versiond' "$BOOK/$version_is_in" | cut -d\" -f2) fi ;; *)