summaryrefslogtreecommitdiffstats
path: root/scripts/add-changelog.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/add-changelog.sh')
-rwxr-xr-xscripts/add-changelog.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/add-changelog.sh b/scripts/add-changelog.sh
new file mode 100755
index 000000000..fa0157afb
--- /dev/null
+++ b/scripts/add-changelog.sh
@@ -0,0 +1,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