aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2023-09-13 16:07:33 +0800
committerXi Ruoyao <xry111@xry111.site>2023-09-13 16:08:06 +0800
commitb91b12adf3d7926f570b900f758e4670de3d4ec1 (patch)
treee87ad4eddc618319f739bf546de0043b536388e9
parent80da60f0c070dee52f7add18aea74c0e124ed8f7 (diff)
git-version: Always skip creating version.ent if LFS-RELEASE exists
-rwxr-xr-xgit-version.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/git-version.sh b/git-version.sh
index 4a3c6d1e4..5d8d32e5d 100755
--- a/git-version.sh
+++ b/git-version.sh
@@ -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