summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xbuild/mkrevision.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/build/mkrevision.sh b/build/mkrevision.sh
index 889ce75c2..02b7fa371 100755
--- a/build/mkrevision.sh
+++ b/build/mkrevision.sh
@@ -14,7 +14,10 @@ TOPDIR="${0%mkrevision.sh}"
elif git log -1 >/dev/null 2>/dev/null; then
revision="svn-r$(LC_ALL=C git log -1 | sed -ne 's/.*git-svn-id: .*@\([0-9]\+\) .*/\1/p')"
if [ "$revision" = "svn-r" ]; then
- revision="git-$(LC_ALL=C git log -1 --pretty=%h)"
+ set -- $(git log -1 --format="%ct %h")
+ secs="$(($1 % 86400))"
+ yday="$(date --utc --date="@$1" "+%y.%j")"
+ revision="$(printf 'git-%s.%05d-%s' "$yday" "$secs" "$2")"
fi
else
revision="unknown"