Last active
August 29, 2015 14:04
-
-
Save bhundven/0abb68d2a33b7454bb01 to your computer and use it in GitHub Desktop.
Handy way to add patches to quilt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vi: ts=4:sw=4:et:ai:ft=sh | |
quilt-add-patch () | |
{ | |
dir=$1;shift | |
patch_file=$1;shift | |
quilt new $(basename ${patch_file} | sed -e 's/\.diff//' | sed -e 's/\.patch//') | |
quilt add $(awk '/^---/{ print $2 }' "${dir}/${patch_file}" | sed -e 's/a\///') | |
patch -p1 < "${dir}/${patch_file}" | |
quilt refresh | |
} | |
quilt-add-series () | |
{ | |
series_file=${1};shift | |
for patch_file in $(cat ${series_file}); do | |
quilt-add-patch $(dirname ${series_file}) $(basename ${patch_file}) | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment