diff options
author | Pierre Labastie <pierre.labastie@neuf.fr> | 2022-09-11 18:42:26 +0200 |
---|---|---|
committer | Pierre Labastie <pierre.labastie@neuf.fr> | 2022-09-11 18:42:58 +0200 |
commit | c37e846f4b5db3ae2037dee054b3923192a50a31 (patch) | |
tree | 07e57b371423cc7689fba0738075cfacd67c7b53 /git-version.sh | |
parent | 84e1bb6b853b6b22fd362ba2e0542444ae479262 (diff) |
Replace tabs with spaces
Diffstat (limited to 'git-version.sh')
-rwxr-xr-x | git-version.sh | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/git-version.sh b/git-version.sh index 7e0b3b4df..a00deb6d2 100755 --- a/git-version.sh +++ b/git-version.sh @@ -1,31 +1,31 @@ #!/bin/sh if [ "$1" = sysv ]; then - SYSV="INCLUDE" - SYSTEMD="IGNORE " + SYSV="INCLUDE" + SYSTEMD="IGNORE " elif [ "$1" = systemd ]; then - SYSV="IGNORE " - SYSTEMD="INCLUDE" + SYSV="IGNORE " + SYSTEMD="INCLUDE" else - echo You must provide either \"sysv\" or \"systemd\" as argument - exit 1 + echo You must provide either \"sysv\" or \"systemd\" as argument + exit 1 fi echo "<!ENTITY % sysv \"$SYSV\">" > conditional.ent echo "<!ENTITY % systemd \"$SYSTEMD\">" >> conditional.ent if ! git status > /dev/null; then - # Either it's not a git repository, or git is unavaliable. - # Just workaround. - echo "<![ %sysv; [" > version.ent - echo "<!ENTITY version \"unknown\">" >> version.ent - echo "]]>" >> version.ent - echo "<![ %systemd; [" >> version.ent - echo "<!ENTITY version \"unknown-systemd\">" >> version.ent - echo "]]>" >> version.ent - echo "<!ENTITY releasedate \"unknown\">" >> version.ent - echo "<!ENTITY copyrightdate \"1999-2022\">" >> version.ent - exit 0 + # Either it's not a git repository, or git is unavaliable. + # Just workaround. + echo "<![ %sysv; [" > version.ent + echo "<!ENTITY version \"unknown\">" >> version.ent + echo "]]>" >> version.ent + echo "<![ %systemd; [" >> version.ent + echo "<!ENTITY version \"unknown-systemd\">" >> version.ent + echo "]]>" >> version.ent + echo "<!ENTITY releasedate \"unknown\">" >> version.ent + echo "<!ENTITY copyrightdate \"1999-2022\">" >> version.ent + exit 0 fi export LC_ALL=en_US.utf8 @@ -39,10 +39,10 @@ month_digit=$(date --date "$commit_date" "+%m") day=$(date --date "$commit_date" "+%d" | sed 's/^0//') case $day in - "1" | "21" | "31" ) suffix="st";; - "2" | "22" ) suffix="nd";; - "3" | "23" ) suffix="rd";; - * ) suffix="th";; + "1" | "21" | "31" ) suffix="st";; + "2" | "22" ) suffix="nd";; + "3" | "23" ) suffix="rd";; + * ) suffix="th";; esac full_date="$month $day$suffix, $year" @@ -53,8 +53,8 @@ version="$rev" versiond="$rev-systemd" if [ "$(git diff HEAD | wc -l)" != "0" ]; then - version="$version+" - versiond="$versiond+" + version="$version+" + versiond="$versiond+" fi echo "<![ %sysv; [" > version.ent |