diff options
Diffstat (limited to '.bashrc-work')
-rw-r--r-- | .bashrc-work | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/.bashrc-work b/.bashrc-work new file mode 100644 index 0000000..3fc6b75 --- /dev/null +++ b/.bashrc-work @@ -0,0 +1,20 @@ +# .bashrc-work + +patch-suggested-change() { + [ $# -ne 1 ] && int-usage "rej-file" && return + local origfile=${1%.rej} + { echo "diff ${origfile}.patch ${origfile}.patch.orig"; colordiff -du \ + <(diff -du \ + "${origfile}" \ + <(wiggle --merge "${origfile}" "${origfile}.rej") \ + | tail -n+3) \ + <(tail -n+3 "${origfile}.rej") + } | sed '2,4d;' | subdiff + #} | subdiff | tail -n+5 +} + +patch-suggested-changes() { + for f in $(find -name '*.rej'); do + patch-suggested-change "${f}" + done +} |