git-version: correct the workaround without git

This commit is contained in:
Xi Ruoyao 2021-10-17 03:26:41 +08:00
parent 8025137e7c
commit 49661ec8e5
No known key found for this signature in database
GPG Key ID: D95E4716CCBB34DC

View File

@ -3,10 +3,13 @@
if ! git status > /dev/null; then
# Either it's not a git repository, or git is unavaliable.
# Just workaround.
echo "<!ENTITY version \"unknown\">" > version.ent
echo "<!ENTITY versiond \"unknown-systemd\">" >> version.ent
echo "<!ENTITY releasedate \"unknown\">" >> version.ent
echo "<!ENTITY day \"??\">" > version.ent
echo "<!ENTITY month \"??\">" >> version.ent
echo "<!ENTITY year \"????\">" >> version.ent
echo "<!ENTITY copyrightdate \"1999-2021\">" >> version.ent
echo "<!ENTITY version \"unknown\">" >> version.ent
echo "<!ENTITY releasedate \"unknown\">" >> version.ent
echo "<!ENTITY pubdate \"unknown\">" >> version.ent
exit 0
fi