File: generate-ChangeLog.sh

package info (click to toggle)
gtkpod 2.1.5-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 19,428 kB
  • ctags: 6,307
  • sloc: ansic: 51,604; xml: 16,135; sh: 11,916; cpp: 7,545; perl: 1,449; makefile: 1,376; lex: 638; awk: 73; python: 35
file content (23 lines) | stat: -rwxr-xr-x 526 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

if [ $# -eq 0 ]; then
  top_srcdir="."
  distdir="."
elif [ $# -eq 1 ]; then
  top_srcdir=$1
  distdir="."
else
  top_srcdir=$1
  distdir=$2
fi

if [ -f ${distdir}/ChangeLog ]; then
	chmod u+w ${distdir}/ChangeLog
fi

git log --date-order --date=short | \
	sed -e '/^commit.*$/d' | \
	awk '/^Author/ {sub(/\\$/,""); getline t; print $0 t; next}; 1' | \
	sed -e 's/^Author: //g' | \
	sed -e 's/>Date:   \([0-9]*-[0-9]*-[0-9]*\)/>\t\1/g' | \
	sed -e 's/^\(.*\) \(\)\t\(.*\)/\3    \1    \2/g' > ${distdir}/ChangeLog