aboutsummaryrefslogtreecommitdiffstats
path: root/bash_completion/kerl
diff options
context:
space:
mode:
authorJoseph Wayne Norton <[email protected]>2012-05-11 18:12:31 +0900
committerJoseph Wayne Norton <[email protected]>2012-05-12 00:56:41 +0900
commitc46684b1550da8260c8d3d6329685cc9770d6cfe (patch)
tree0746504283f6fb3cc50814942133193afa0d20df /bash_completion/kerl
parenta284ba75b4328d766f7950002eca390cbab64fba (diff)
downloadkerl-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/kerl18
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