Skip to content

Instantly share code, notes, and snippets.

@k0pernikus
Forked from blech75/svn-zip
Created August 24, 2012 14:17
Show Gist options
  • Select an option

  • Save k0pernikus/3451115 to your computer and use it in GitHub Desktop.

Select an option

Save k0pernikus/3451115 to your computer and use it in GitHub Desktop.
export SVN URL, zip it up, drop it on your desktop
#!/bin/bash
if [ $# -ne 2 ] ; then
echo "Usage: "`basename "$0"` "SVN_URL ZIP_NAME" >&2
exit 1
fi
SVN_URL=$1
DIR_NAME=$2
cd ~/Desktop/
# svn export -q $SVN_URL $DIR_NAME
svn export $SVN_URL $DIR_NAME
zip -rq ${DIR_NAME}.zip $DIR_NAME
rm -rf $DIR_NAME
echo "Successfully created ${DIR_NAME}.zip from ${SVN_URL}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment