rpms/kernel/devel/scripts newpatch.sh,NONE,1.1
Dave Jones (davej)
fedora-extras-commits at redhat.com
Tue Oct 9 05:17:33 UTC 2007
Author: davej
Update of /cvs/pkgs/rpms/kernel/devel/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11556/scripts
Added Files:
newpatch.sh
Log Message:
script to auto-add patches at the end of the specfile.
--- NEW FILE newpatch.sh ---
#!/bin/sh
# Easy application of new patches.
# Always adds to the very end. (Bumps last patch nr by 100)
# Parameters:
# $1 - patch filename
# $2 - description
OLD=$(grep ^Patch kernel.spec | tail -n1 | awk '{ print $1 }' | sed s/Patch// | sed s/://)
NEW=$(($OLD/100*100+100))
sed -i "/^Patch$OLD:\ /a#\ $2\nPatch$NEW:\ $1" kernel.spec
LAST=$(grep ^ApplyPatch kernel.spec | tail -n1 | awk '{ print $2 }')
sed -i "/^ApplyPatch $LAST/aApplyPatch $1" kernel.spec
cvs add $1
bumpspecfile.py kernel.spec "- $2"
make clog
More information about the fedora-extras-commits
mailing list