Created
May 28, 2012 19:08
-
-
Save playpauseandstop/2820717 to your computer and use it in GitHub Desktop.
Simple script to archive git repository
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
#!/bin/sh | |
# | |
# Simple script to archive git repository. | |
# | |
branch=HEAD | |
dest=`echo ~/Projects` | |
format=zip | |
prefix=`basename $(pwd)` | |
result=$dest/$prefix-$branch-`date "+%Y-%m-%d-%H%M%S"`.$format | |
git archive $branch --format=$format --prefix=$prefix/ > $result | |
echo "$branch of $prefix archived to $result" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment