Blame scripts/newpatch.sh
|
Roland McGrath |
11487c5 |
#!/bin/sh
|
|
Roland McGrath |
11487c5 |
# Easy application of new patches.
|
|
Roland McGrath |
11487c5 |
# Always adds to the very end. (Bumps last patch nr by 100)
|
|
Roland McGrath |
11487c5 |
# Parameters:
|
|
Roland McGrath |
11487c5 |
# $1 - patch filename
|
|
Roland McGrath |
11487c5 |
# $2 - description
|
|
Roland McGrath |
11487c5 |
|
|
Roland McGrath |
11487c5 |
OLD=$(grep ^Patch kernel.spec | tail -n1 | awk '{ print $1 }' | sed s/Patch// | sed s/://)
|
|
Roland McGrath |
11487c5 |
NEW=$(($OLD/100*100+100))
|
|
Roland McGrath |
11487c5 |
|
|
Roland McGrath |
11487c5 |
sed -i "/^Patch$OLD:\ /a#\ $2\nPatch$NEW:\ $1" kernel.spec
|
|
Roland McGrath |
11487c5 |
|
|
Roland McGrath |
11487c5 |
LAST=$(grep ^ApplyPatch kernel.spec | tail -n1 | awk '{ print $2 }')
|
|
Roland McGrath |
11487c5 |
|
|
Roland McGrath |
11487c5 |
sed -i "/^ApplyPatch $LAST/aApplyPatch $1" kernel.spec
|
|
Roland McGrath |
11487c5 |
|
|
Roland McGrath |
11487c5 |
cvs add $1
|
|
Roland McGrath |
11487c5 |
|
|
Roland McGrath |
11487c5 |
scripts/bumpspecfile.py kernel.spec "- $2"
|
|
Roland McGrath |
11487c5 |
make clog
|
|
Roland McGrath |
11487c5 |
|