comparison easyhg-extdiff.sh @ 336:4229b6a8e9c6

Merge
author Chris Cannam
date Mon, 14 Mar 2011 10:00:29 +0000
parents ea62eb083ed4
children d63711ff6740
comparison
equal deleted inserted replaced
335:aa852b477e4d 336:4229b6a8e9c6
5 exit 2 5 exit 2
6 fi 6 fi
7 while [ $# -gt 2 ]; do 7 while [ $# -gt 2 ]; do
8 shift 8 shift
9 done 9 done
10 found=""
11 for d in kdiff3 kdiff3.exe; do 10 for d in kdiff3 kdiff3.exe; do
12 if [ -x "$p/$d" ]; then 11 if [ -x "$p/$d" ]; then
13 found=true 12 exec "$p/$d" "$1" "$2"
14 "$p/$d" "$1" "$2"
15 break
16 elif [ -x "$(type -path $d)" ]; then 13 elif [ -x "$(type -path $d)" ]; then
17 found=true 14 exec "$d" "$1" "$2"
18 "$d" "$1" "$2"
19 break;
20 fi 15 fi
21 done 16 done
22 if [ -z "$found" ]; then 17 od=/usr/bin/opendiff
23 od=/usr/bin/opendiff 18 if [ -x "$od" ]; then
24 if [ -x "$od" ]; then 19 "$od" "$1" "$2" | cat
25 found=true 20 exit 0
26 "$od" "$1" "$2" | cat
27 fi
28 fi 21 fi
29 [ -n "$found" ] 22 exit 1
30 23