annotate 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
rev   line source
Chris@210 1 #!/bin/bash
Chris@269 2 p=`dirname $0`
Chris@210 3 if [ $# -lt 2 ]; then
Chris@210 4 echo Insufficient arguments: $@
Chris@210 5 exit 2
Chris@210 6 fi
Chris@210 7 while [ $# -gt 2 ]; do
Chris@210 8 shift
Chris@210 9 done
Chris@269 10 found=""
Chris@269 11 for d in kdiff3 kdiff3.exe; do
Chris@269 12 if [ -x "$p/$d" ]; then
Chris@269 13 found=true
Chris@269 14 "$p/$d" "$1" "$2"
Chris@269 15 break
Chris@269 16 fi
Chris@269 17 done
Chris@269 18 if [ -z "$found" ]; then
Chris@269 19 od=/usr/bin/opendiff
Chris@269 20 if [ -x "$od" ]; then
Chris@269 21 "$od" "$1" "$2" | cat
Chris@269 22 fi
Chris@269 23 fi