Skip to content

Instantly share code, notes, and snippets.

@aaoliveira
Forked from MarcosX/git_meld_install.sh
Created April 27, 2016 16:49
Show Gist options
  • Save aaoliveira/1265ee5b5112d317cec3e1e811f864a0 to your computer and use it in GitHub Desktop.
Save aaoliveira/1265ee5b5112d317cec3e1e811f864a0 to your computer and use it in GitHub Desktop.
Install Meld as the default git diff tool. Must be executed as sudo
#!/bin/bash
echo "Installing meld..."
apt-get install meld -y -qq
echo "Meld [OK]"
echo "Creating meld custom script..."
rm ~/.config/git_meld_diff.sh
touch ~/.config/git_meld_diff.sh
echo "#!/bin/bash" >> ~/.config/git_meld_diff.sh
echo "meld \"\$5\" \"\$2\"" >> ~/.config/git_meld_diff.sh
chmod +x ~/.config/git_meld_diff.sh
echo "Meld custom script [OK]"
echo "Configuring git diff external..."
git config --global diff.external ~/.config/git_meld_diff.sh
echo "Git configuration [OK]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment