Skip to content

Instantly share code, notes, and snippets.

@Kanst
Last active December 28, 2015 13:58
Show Gist options
  • Save Kanst/7511079 to your computer and use it in GitHub Desktop.
Save Kanst/7511079 to your computer and use it in GitHub Desktop.
cap deploy in commit
#!/bin/bash
usage()
{
cat << EOF
usage: $0 options
This script run cap [-S revision = commit] deploy
example cap_deploy.sh -c 97c902b9d9d29952f33d6c7406859fb946f2bbf8
OPTIONS:
-h Show this message
-c run commit
EOF
}
while getopts "hc:" opt; do
case $opt in
h)
usage
exit 1
;;
c)
b='-S revision='$OPTARG
;;
esac
done
cap ${b} deploy
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment