view easyhg-extdiff.sh @ 281:9162f14c5ab7

* Change "diff to parent <id>" menu entries in changeset item right-button menu to "diff to left parent" and "diff to right parent"
author Chris Cannam
date Fri, 18 Feb 2011 13:38:31 +0000
parents f6b71fda5957
children 24820581e532
line wrap: on
line source
#!/bin/bash
p=`dirname $0`
if [ $# -lt 2 ]; then 
    echo Insufficient arguments: $@
    exit 2
fi
while [ $# -gt 2 ]; do
    shift
done
found=""
for d in kdiff3 kdiff3.exe; do
    if [ -x "$p/$d" ]; then
	found=true
	"$p/$d" "$1" "$2"
	break
    fi
done
if [ -z "$found" ]; then
    od=/usr/bin/opendiff
    if [ -x "$od" ]; then
	"$od" "$1" "$2" | cat
    fi
fi