summaryrefslogtreecommitdiffstats
path: root/scripts/add-changelog.sh
blob: fa0157afb1626827fc8b62861e5437d3b325f5cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
# Emulate the changelog part of rpmdev-bumpspec without the bumping of the
# rev. Because Laura keeps typoing her name and the date.

CURDATE=`date +"%a %b %d %Y"`
PACKAGER=`rpmdev-packager`
CHANGELOG="%changelog\n* $CURDATE $PACKAGER\n- $1\n"

awk -v CHANGE="$CHANGELOG" '/%changelog/ {print CHANGE} \
			!/%changelog/ { print $0 }' \
			< kernel.spec > kernel.spec.tmp
mv kernel.spec.tmp kernel.spec