Changeset c37e846 for git-version.sh
- Timestamp:
- 09/11/2022 04:42:58 PM (20 months ago)
- Branches:
- 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, bdubbs/gcc13, multilib, renodr/libudev-from-systemd, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 7bd0378
- Parents:
- 84e1bb6
- git-author:
- Pierre Labastie <pierre.labastie@…> (09/11/2022 04:42:26 PM)
- git-committer:
- Pierre Labastie <pierre.labastie@…> (09/11/2022 04:42:58 PM)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
git-version.sh
r84e1bb6 rc37e846 2 2 3 3 if [ "$1" = sysv ]; then 4 5 4 SYSV="INCLUDE" 5 SYSTEMD="IGNORE " 6 6 elif [ "$1" = systemd ]; then 7 8 7 SYSV="IGNORE " 8 SYSTEMD="INCLUDE" 9 9 else 10 11 10 echo You must provide either \"sysv\" or \"systemd\" as argument 11 exit 1 12 12 fi 13 13 … … 16 16 17 17 if ! git status > /dev/null; then 18 19 20 21 22 23 24 25 26 27 28 18 # Either it's not a git repository, or git is unavaliable. 19 # Just workaround. 20 echo "<![ %sysv; [" > version.ent 21 echo "<!ENTITY version \"unknown\">" >> version.ent 22 echo "]]>" >> version.ent 23 echo "<![ %systemd; [" >> version.ent 24 echo "<!ENTITY version \"unknown-systemd\">" >> version.ent 25 echo "]]>" >> version.ent 26 echo "<!ENTITY releasedate \"unknown\">" >> version.ent 27 echo "<!ENTITY copyrightdate \"1999-2022\">" >> version.ent 28 exit 0 29 29 fi 30 30 … … 40 40 41 41 case $day in 42 43 44 45 42 "1" | "21" | "31" ) suffix="st";; 43 "2" | "22" ) suffix="nd";; 44 "3" | "23" ) suffix="rd";; 45 * ) suffix="th";; 46 46 esac 47 47 … … 54 54 55 55 if [ "$(git diff HEAD | wc -l)" != "0" ]; then 56 57 56 version="$version+" 57 versiond="$versiond+" 58 58 fi 59 59
Note:
See TracChangeset
for help on using the changeset viewer.