Created
December 13, 2013 06:05
-
-
Save wecanspeak/7940388 to your computer and use it in GitHub Desktop.
svn diff by vimdiff and rescue from multiple vim quits
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/sh | |
DIFF="/usr/bin/vimdiff" | |
LEFT=${6} # old file | |
RIGHT=${7} # new file | |
L_TITLE=${3} # file name and revision of old file | |
R_TITLE=${5} # file name and revision of new file | |
bold=`tput bold` | |
normal=`tput sgr0` | |
read -p "diff [${bold}${L_TITLE}${normal}]-[${bold}$R_TITLE${normal}]? [y/n]" yn | |
if [ "$yn" = "y" ] || [ "$yn" = "Y" ]; then | |
$DIFF $LEFT $RIGHT | |
else | |
echo "skip diff" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment