Mercurial > hg > easyhg
comparison easyhg-extdiff.sh @ 282:1ec306df738e
Merge
author | Chris Cannam |
---|---|
date | Fri, 18 Feb 2011 13:39:16 +0000 |
parents | 24820581e532 |
children | a1c8630a0057 |
comparison
equal
deleted
inserted
replaced
281:9162f14c5ab7 | 282:1ec306df738e |
---|---|
1 #!/bin/bash | 1 #!/bin/bash -x |
2 p=`dirname $0` | 2 p=`dirname $0` |
3 if [ $# -lt 2 ]; then | 3 if [ $# -lt 2 ]; then |
4 echo Insufficient arguments: $@ | 4 echo Insufficient arguments: $@ |
5 exit 2 | 5 exit 2 |
6 fi | 6 fi |
11 for d in kdiff3 kdiff3.exe; do | 11 for d in kdiff3 kdiff3.exe; do |
12 if [ -x "$p/$d" ]; then | 12 if [ -x "$p/$d" ]; then |
13 found=true | 13 found=true |
14 "$p/$d" "$1" "$2" | 14 "$p/$d" "$1" "$2" |
15 break | 15 break |
16 elif [ -x "$(type -path $d)" ]; then | |
17 found=true | |
18 "$d" "$1" "$2" | |
19 break; | |
16 fi | 20 fi |
17 done | 21 done |
18 if [ -z "$found" ]; then | 22 if [ -z "$found" ]; then |
19 od=/usr/bin/opendiff | 23 od=/usr/bin/opendiff |
20 if [ -x "$od" ]; then | 24 if [ -x "$od" ]; then |
25 found=true | |
21 "$od" "$1" "$2" | cat | 26 "$od" "$1" "$2" | cat |
22 fi | 27 fi |
23 fi | 28 fi |
29 [ -z "$found" ] | |
30 |