Skip to content

Instantly share code, notes, and snippets.

@xanathar
Created November 9, 2017 12:15
Show Gist options
  • Save xanathar/b0a807f3d288c5ec98cb9196b8fdf49e to your computer and use it in GitHub Desktop.
Save xanathar/b0a807f3d288c5ec98cb9196b8fdf49e to your computer and use it in GitHub Desktop.
Run WinMerge from Unix shell after installing Wine
#! /bin/bash
if [ $# -eq 0 ]; then
FILE1=$(winepath -w . 2>/dev/null)
wine "C:\program files (x86)\WinMerge\WinMergeU.exe" "$FILE1"
elif [ $# -eq 1 ]; then
FILE1=$(winepath -w "$1" 2>/dev/null)
wine "C:\program files (x86)\WinMerge\WinMergeU.exe" "$FILE1"
else
FILE1=$(winepath -w "$1" 2>/dev/null)
FILE2=$(winepath -w "$2" 2>/dev/null)
wine "C:\program files (x86)\WinMerge\WinMergeU.exe" "$FILE1" "$FILE2"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment