Add support to send password on deploy

This commit is contained in:
Bruno Tavares
2014-02-21 21:27:32 -03:00
parent 57b73e88fd
commit b783772864
2 changed files with 8 additions and 2 deletions

View File

@ -1,12 +1,12 @@
#!/bin/bash -e
[[ "$1" == "--sudo" ]] && prefix="sudo " && shift
[[ "$1" == "--password" ]] && shift && prefix="echo \"$1\" | sudo -S " && shift
target=$1
[ "$target" ] || echo "Please, provide an ssh target"
shift
[[ "$1" == "--sudo" ]] && prefix="sudo " && shift
[ "$DEBUG" ] && debug="-x"
remote_command=$(