Created
February 4, 2016 02:11
-
-
Save jamesmunns/706a569de948c6801a37 to your computer and use it in GitHub Desktop.
This file contains 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
# COMPARE A REFERENCE AGAINST WORKING DIRECTORY | |
# Use (from the git repo root): | |
# <path to script>/diffref.sh master | |
# Build destination temp folder | |
DATEHASH=`echo "obase=16; $(date +%s)" | bc` | |
DESTFOLDER=/tmp/diffref-$DATEHASH-$1 | |
mkdir $DESTFOLDER | |
# Export Reference | |
git archive $1 | tar -xC $DESTFOLDER | |
# Fire Diff | |
bcomp -ro1 $DESTFOLDER $(pwd) -title1=$1 -title2="Working Directory" | |
# Clean Up | |
rm -rf $DESTFOLDER |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment