kernel/scripts/add-changelog.sh
Justin M. Forbes 47a895f435 Linux v5.8.1
Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org>
2020-08-12 08:03:24 -05:00

13 lines
412 B
Bash
Executable File

#!/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