diff options
Diffstat (limited to 'home/john/.config/rox.sourceforge.net/SendTo')
-rwxr-xr-x | home/john/.config/rox.sourceforge.net/SendTo/.group/diff | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/home/john/.config/rox.sourceforge.net/SendTo/.group/diff b/home/john/.config/rox.sourceforge.net/SendTo/.group/diff index b780c24..d29602e 100755 --- a/home/john/.config/rox.sourceforge.net/SendTo/.group/diff +++ b/home/john/.config/rox.sourceforge.net/SendTo/.group/diff @@ -1,5 +1,29 @@ #!/bin/sh + d="$(dirname "$1")/" cd "$d" + +# Re-arrange x, x.orig to x.orig, x +i=0 +while [ $((++i)) -le $# ]; do + if [ $i -le $# ]; then + if [ x"$1" = x"${2%.orig}" ]; then + a=$1 + b=$2 + shift 2 + : $((++i)) + set -- "$@" "$b" "$a" + else + a=$1 + shift + set -- "$@" "$a" + fi + else + a=$1 + shift + set -- "$@" "$a" + fi +done + t=diff; for x in "$@"; do t=$t" ${x#$d}"; done -exec xterm -title "$t" -e with-shell diff -u "$@" +exec xterm -title "$t" -e with-pager diff -u "$@" |