git-version: Always skip creating version.ent if LFS-RELEASE exists

This commit is contained in:
Xi Ruoyao 2023-09-13 16:07:33 +08:00
parent 80da60f0c0
commit b91b12adf3
No known key found for this signature in database
GPG Key ID: ACAAD20E19E710E3

View File

@ -14,14 +14,13 @@ fi
echo "<!ENTITY % sysv \"$SYSV\">" > conditional.ent
echo "<!ENTITY % systemd \"$SYSTEMD\">" >> conditional.ent
if [ -e LFS-RELEASE ]; then
exit 0
fi
if ! git status > /dev/null; then
# Either it's not a git repository, or git is unavaliable.
# Just workaround.
if [ -e LFS-RELEASE ]; then
exit 0
fi
echo "<![ %sysv; [" > version.ent
echo "<!ENTITY version \"unknown\">" >> version.ent
echo "]]>" >> version.ent