Created
September 18, 2012 02:12
-
-
Save Tanner/3740883 to your computer and use it in GitHub Desktop.
Creates a zip file without .git, .gitignore, or .DS_Store
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/bash | |
if [ $# -ne 1 ]; then | |
echo "Usage: ${0} directory" | |
exit 1 | |
fi | |
if [ -d ${1} ]; then | |
DIR_NAME=$(basename ${1}) | |
echo "Creating zip file..." | |
zip -rq $DIR_NAME.zip ${1} -x ${1}/.git/\* ${1}/.gitignore ${1}/.DS_Store | |
echo "All done!" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment