aboutsummaryrefslogtreecommitdiffstats
path: root/git-version.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-version.sh')
-rwxr-xr-xgit-version.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/git-version.sh b/git-version.sh
index 6a242e7ed..0e5d94da3 100755
--- a/git-version.sh
+++ b/git-version.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
if [ "$1" = sysv ]; then
SYSV="INCLUDE"
@@ -14,6 +14,10 @@ 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.
@@ -24,7 +28,7 @@ if ! git status > /dev/null; then
echo "<!ENTITY version \"unknown-systemd\">" >> version.ent
echo "]]>" >> version.ent
echo "<!ENTITY releasedate \"unknown\">" >> version.ent
- echo "<!ENTITY copyrightdate \"1999-2022\">" >> version.ent
+ echo "<!ENTITY copyrightdate \"1999-2023\">" >> version.ent
exit 0
fi
@@ -65,3 +69,5 @@ echo "<!ENTITY version \"$versiond\">" >> version.ent
echo "]]>" >> version.ent
echo "<!ENTITY releasedate \"$full_date\">" >> version.ent
echo "<!ENTITY copyrightdate \"1999-$year\">" >> version.ent
+
+[ -z "$DIST" ] || echo $version > "$DIST"