Skip to content

Instantly share code, notes, and snippets.

@lauriro
Created March 4, 2010 13:41
Show Gist options
  • Save lauriro/321704 to your computer and use it in GitHub Desktop.
Save lauriro/321704 to your computer and use it in GitHub Desktop.
diffmerge-diff.sh
#!/bin/sh
if [ ! -f "$2" -o ! -f "$5" ] ; then
echo "One side missing: $2 vs. $5"
exit 0
fi
if which cygpath &> /dev/null; then
path="$(cygpath $1)"
old="$(cygpath --mixed --absolute "$2")"
new="$(cygpath --mixed --absolute "$5")"
else
path="$1"
old="$2"
new="$5"
fi
#echo -e "path\n$path"
#echo -e "old\n$old"
#echo -e "new\n$new"
if [ -f "$old" -a -f "$new" ] ; then
/cygdrive/c/Program\ Files/SourceGear/DiffMerge/DiffMerge.exe -nosplash "$old" "$new" --title1="Old" --title2="New $path"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment