File: mkreldate.sh

package info (click to toggle)
mutt 1.13.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 20,432 kB
  • sloc: ansic: 95,029; sh: 4,720; perl: 1,152; makefile: 708; yacc: 318; python: 211
file content (11 lines) | stat: -rwxr-xr-x 302 bytes parent folder | download | duplicates (2)
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