Mercurial > hg > easyhg
comparison easyhg-extdiff.sh @ 269:f6b71fda5957
* Rename the -osx.sh files to plain .sh, since we could use them elsewhere too. Rely on bundled kdiff3 if it exists.
author | Chris Cannam |
---|---|
date | Thu, 20 Jan 2011 13:37:00 +0000 |
parents | easyhg-extdiff-osx.sh@43ecb0dcc44e |
children | 24820581e532 |
comparison
equal
deleted
inserted
replaced
268:b8ded5213d16 | 269:f6b71fda5957 |
---|---|
1 #!/bin/bash | |
2 p=`dirname $0` | |
3 if [ $# -lt 2 ]; then | |
4 echo Insufficient arguments: $@ | |
5 exit 2 | |
6 fi | |
7 while [ $# -gt 2 ]; do | |
8 shift | |
9 done | |
10 found="" | |
11 for d in kdiff3 kdiff3.exe; do | |
12 if [ -x "$p/$d" ]; then | |
13 found=true | |
14 "$p/$d" "$1" "$2" | |
15 break | |
16 fi | |
17 done | |
18 if [ -z "$found" ]; then | |
19 od=/usr/bin/opendiff | |
20 if [ -x "$od" ]; then | |
21 "$od" "$1" "$2" | cat | |
22 fi | |
23 fi |