summaryrefslogtreecommitdiffstats
path: root/mkreldate.sh
blob: 927967d566ab68107edc2a2f87786028efed400e (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
#
# Generates the reldate.h contents from either git or the ChangeLog file

if [ -r ".git" ] && command -v git >/dev/null 2>&1; then
  reldate=`TZ=UTC git log -1 --date=format-local:"%F" --pretty=format:"%cd"`
else
  reldate=`head -n 1 ChangeLog | LC_ALL=C cut -d ' ' -f 1`
fi

echo $reldate