Chris@215: #!/bin/bash Chris@269: p=`dirname $0` Chris@215: echo Args are: $@ 1>&2 Chris@215: if [ "$#" -lt 3 ]; then Chris@215: echo Insufficient arguments: $@ Chris@215: exit 2 Chris@215: fi Chris@215: while [ "$#" -gt 3 ]; do Chris@215: shift Chris@215: done Chris@269: out="$1" Chris@269: left="$1" Chris@269: ancestor="$2" Chris@269: right="$3" Chris@469: for d in easyhg-kdiff3 easyhg-kdiff3.exe kdiff3 kdiff3.exe; do Chris@379: exe="$p/$d" Chris@379: if [ ! -x "$exe" ]; then Chris@379: exe="$(type -path $d)" Chris@379: if [ ! -x "$exe" ]; then Chris@379: exe="" Chris@379: fi Chris@379: fi Chris@379: if [ -n "$exe" ]; then Chris@379: exec "$exe" "$ancestor" "$left" "$right" --output "$out" --auto -L1 "`basename $left` (Common ancestor)" -L2 "$left (Your current version)" -L3 "`basename $left` (Version being merged)" Chris@269: fi Chris@269: done Chris@328: fm=/Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge Chris@328: if [ -x "$fm" ]; then Chris@328: exec "$fm" -left "$left" -merge "$out" -ancestor "$ancestor" -right "$right" Chris@269: fi Chris@328: exit 1