Skip to content

Instantly share code, notes, and snippets.

@joet3ch
Created September 17, 2010 03:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joet3ch/583617 to your computer and use it in GitHub Desktop.
Save joet3ch/583617 to your computer and use it in GitHub Desktop.
#!/bin/bash
##
## svn export and package for production
##
if [ -f /tmp/svnUpdate.lck ]; then
echo "This application is already running! You must manually clear the lockfile: /tmp/svnUpdate.lck"
exit 1
fi
touch /tmp/svnUpdate.lck
rm -rf /tmp/$1
mkdir /tmp/$1
svn export --force $2 /tmp/$1/
cd /tmp/
tar -czf $1.tgz $1/
rm -rf /tmp/svnUpdate.lck
scp -P 22 /tmp/$1.tgz admin@xxxx.com:/home/admin/domains/xxxx.com/versions/
ssh admin@xxxx.com -C "/home/admin/domains/xxxx.com/scripts/updateSite.sh"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment