diff options
author | Joseph Wayne Norton <[email protected]> | 2012-05-11 18:12:31 +0900 |
---|---|---|
committer | Joseph Wayne Norton <[email protected]> | 2012-05-12 00:56:41 +0900 |
commit | c46684b1550da8260c8d3d6329685cc9770d6cfe (patch) | |
tree | 0746504283f6fb3cc50814942133193afa0d20df /bash_completion/kerl | |
parent | a284ba75b4328d766f7950002eca390cbab64fba (diff) | |
download | kerl-c46684b1550da8260c8d3d6329685cc9770d6cfe.tar.gz kerl-c46684b1550da8260c8d3d6329685cc9770d6cfe.tar.bz2 kerl-c46684b1550da8260c8d3d6329685cc9770d6cfe.zip |
Add 'kerl deploy' command to deploy an installation to a given host and directory
Diffstat (limited to 'bash_completion/kerl')
-rw-r--r-- | bash_completion/kerl | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/bash_completion/kerl b/bash_completion/kerl index 0d1860a..62efa00 100644 --- a/bash_completion/kerl +++ b/bash_completion/kerl @@ -18,9 +18,9 @@ _kerl() RELEASES=`cat "$HOME/.kerl/otp_releases"` fi COMPREPLY=( $( compgen -W "git $RELEASES" -- "$cur") ) - else + else if [ -f "$HOME/.kerl/otp_builds" ]; then - BUILDS=`cat "$HOME/.kerl/otp_builds" | cut -d "," -f 2` + BUILDS=`cat "$HOME/.kerl/otp_builds" | cut -d "," -f 2` fi COMPREPLY=( $( compgen -W "$BUILDS" -- "$cur") ) fi @@ -33,10 +33,18 @@ _kerl() ;; install) if [ -f "$HOME/.kerl/otp_builds" ]; then - BUILDS=`cat "$HOME/.kerl/otp_builds" | cut -d "," -f 2` + BUILDS=`cat "$HOME/.kerl/otp_builds" | cut -d "," -f 2` fi COMPREPLY=( $( compgen -W "$BUILDS" -- "$cur") ) ;; + deploy) + if [ "$COMP_CWORD" -eq 3 ]; then + if [ -f "$HOME/.kerl/otp_installations" ]; then + PATHS=`cat "$HOME/.kerl/otp_installations" | cut -d " " -f 2` + fi + fi + COMPREPLY=( $( compgen -W "$PATHS" -- "$cur") ) + ;; delete) COMPREPLY=( $( compgen -W "build installation $words" -- "$cur") ) ;; @@ -46,7 +54,7 @@ _kerl() agner) if [ "$COMP_CWORD" -eq 3 ]; then if [ -f "$HOME/.kerl/otp_builds" ]; then - BUILDS=`cat "$HOME/.kerl/otp_builds" | cut -d "," -f 2` + BUILDS=`cat "$HOME/.kerl/otp_builds" | cut -d "," -f 2` fi fi COMPREPLY=( $( compgen -W "$BUILDS" -- "$cur") ) @@ -54,7 +62,7 @@ _kerl() *) if [ "$COMP_CWORD" -eq 3 ]; then if [ -f "$HOME/.kerl/otp_builds" ]; then - BUILDS=`cat "$HOME/.kerl/otp_builds" | cut -d "," -f 2` + BUILDS=`cat "$HOME/.kerl/otp_builds" | cut -d "," -f 2` fi if [ -n "$BUILDS" ]; then for b in $BUILDS; do |