Created
August 20, 2013 18:30
-
-
Save pcn/6285327 to your computer and use it in GitHub Desktop.
Proposal for "h": an alternative command for the ssh_helper
This file contains hidden or 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
| function h () { | |
| arg1=pop | |
| case $1 in | |
| p*) the_env=production | |
| ;; | |
| s*) the_env=staging | |
| ;; | |
| ua*) the_env=uat | |
| ;; | |
| u*) the_env=utility | |
| ;; | |
| a*) the_env=analytics | |
| ;; | |
| tpp*) the_env=testprep-production | |
| ;; | |
| tps*) the_env=testprep-staging | |
| ;; | |
| rs*) the_env=readiness-staging | |
| ;; | |
| rp*) the_env=readiness-production | |
| ;; | |
| *) | |
| echo "You haven't entered one of the valid environments. (try 'type h' to look at this function)" | |
| return 2 | |
| ;; | |
| esac | |
| ssh_helper -e $the_env $* | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment