comparison easyhg-merge.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-merge-osx.sh@43ecb0dcc44e
children 24820581e532
comparison
equal deleted inserted replaced
268:b8ded5213d16 269:f6b71fda5957
1 #!/bin/bash
2 p=`dirname $0`
3 echo Args are: $@ 1>&2
4 if [ "$#" -lt 3 ]; then
5 echo Insufficient arguments: $@
6 exit 2
7 fi
8 while [ "$#" -gt 3 ]; do
9 shift
10 done
11 out="$1"
12 left="$1"
13 ancestor="$2"
14 right="$3"
15 found=""
16 for d in kdiff3 kdiff3.exe; do
17 if [ -x "$p/$d" ]; then
18 found=true
19 "$p/$d" "$ancestor" "$left" "$right" -o "$out"
20 break
21 fi
22 done
23 if [ -z "$found" ]; then
24 fm=/Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge
25 if [ -x "$fm" ]; then
26 "$fm" -left "$left" -merge "$out" -ancestor "$ancestor" -right "$right"
27 fi
28 fi