Mercurial > hg > easyhg
diff easyhg-extdiff.sh @ 282:1ec306df738e
Merge
author | Chris Cannam |
---|---|
date | Fri, 18 Feb 2011 13:39:16 +0000 |
parents | 24820581e532 |
children | a1c8630a0057 |
line wrap: on
line diff
--- a/easyhg-extdiff.sh Fri Feb 18 13:38:31 2011 +0000 +++ b/easyhg-extdiff.sh Fri Feb 18 13:39:16 2011 +0000 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -x p=`dirname $0` if [ $# -lt 2 ]; then echo Insufficient arguments: $@ @@ -13,11 +13,18 @@ found=true "$p/$d" "$1" "$2" break + elif [ -x "$(type -path $d)" ]; then + found=true + "$d" "$1" "$2" + break; fi done if [ -z "$found" ]; then od=/usr/bin/opendiff if [ -x "$od" ]; then + found=true "$od" "$1" "$2" | cat fi fi +[ -z "$found" ] +