diff easyhg-merge.sh @ 336:4229b6a8e9c6

Merge
author Chris Cannam
date Mon, 14 Mar 2011 10:00:29 +0000
parents ea62eb083ed4
children d2e4bf428cfc
line wrap: on
line diff
--- a/easyhg-merge.sh	Wed Mar 02 15:58:34 2011 +0000
+++ b/easyhg-merge.sh	Mon Mar 14 10:00:29 2011 +0000
@@ -12,23 +12,15 @@
 left="$1"
 ancestor="$2"
 right="$3"
-found=""
 for d in kdiff3 kdiff3.exe; do
     if [ -x "$p/$d" ]; then
-	found=true
-	"$p/$d" "$ancestor" "$left" "$right" -o "$out"
-	break
+	exec "$p/$d" "$ancestor" "$left" "$right" -o "$out"
     elif [ -x "$(type -path $d)" ]; then
-	found=true
-	"$d" "$ancestor" "$left" "$right" -o "$out"
-	break;
+	exec "$d" "$ancestor" "$left" "$right" -o "$out"
     fi
 done
-if [ -z "$found" ]; then
-    fm=/Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge
-    if [ -x "$fm" ]; then
-	found=true
-	"$fm" -left "$left" -merge "$out" -ancestor "$ancestor" -right "$right"
-    fi
+fm=/Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge
+if [ -x "$fm" ]; then
+    exec "$fm" -left "$left" -merge "$out" -ancestor "$ancestor" -right "$right"
 fi
-[ -n "$found" ]
+exit 1