Created
August 1, 2012 09:59
-
-
Save toaomatis/3225571 to your computer and use it in GitHub Desktop.
A simple nautilus script that opens meld with the selected (0 to 3) files of folders in diff view
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
command -v meld >/dev/null 2>&1 || { echo >&2 "I require meld but it's not installed. Aborting."; exit 1; } | |
if [ -n "$3" ] | |
then | |
## Third argument is set | |
meld "$1" "$2" "$3" | |
elif [ -n "$2" ] | |
then | |
## Second argument is set | |
meld "$1" "$2" | |
elif [ -n "$1" ] | |
then | |
## First argument is set | |
meld "$1" | |
else | |
## No argument is set | |
meld | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment