Skip to content

Instantly share code, notes, and snippets.

@fsouza
Created May 9, 2014 19:20
Show Gist options
  • Save fsouza/aa513c27a5b14724cfad to your computer and use it in GitHub Desktop.
Save fsouza/aa513c27a5b14724cfad to your computer and use it in GitHub Desktop.
#!/bin/bash -el
if [ $# -lt 2 ]
then
echo "Usage:"
echo
echo " % $0 <git-repository> <git-ref-id>"
exit 1
fi
function deploy() {
cd /home/application
curl $2 -o archive.tar.gz
tar -xzf archive.tar.gz
rm archive.tar.gz
cd -
}
SOURCE_DIR=/var/lib/tsuru
source ${SOURCE_DIR}/config
deploy $@
shift; shift
export $@
python ${SOURCE_DIR}/hooks.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment