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@269: for d in kdiff3 kdiff3.exe; do Chris@269: if [ -x "$p/$d" ]; then Chris@328: exec "$p/$d" "$ancestor" "$left" "$right" -o "$out" Chris@274: elif [ -x "$(type -path $d)" ]; then Chris@328: exec "$d" "$ancestor" "$left" "$right" -o "$out" 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