mirror of
https://github.com/DictXiong/dotfiles.git
synced 2026-11-05 19:48:15 +08:00
common.sh: argparser supports -d/--dev and -D/--dry-run
This commit is contained in:
@@ -115,7 +115,7 @@ eval_or_echo() {
|
||||
fi
|
||||
}
|
||||
|
||||
# ssh
|
||||
# ssh series
|
||||
prepare_ssh_cmd() {
|
||||
local ssh_bin="${1:-ssh}"
|
||||
if [[ "$ssh_bin" == "scp" || "$ssh_bin" == "sftp" ]]; then
|
||||
@@ -126,6 +126,7 @@ prepare_ssh_cmd() {
|
||||
echo "$ssh_bin ${PORT:+$port_param} $PORT $SSH_OPTIONS $SCP_SRC $USERNAME${USERNAME:+@}$SERVER $SCP_DST"
|
||||
}
|
||||
|
||||
# ssh
|
||||
run_ssh()
|
||||
{
|
||||
local cmd="$(prepare_ssh_cmd $1)"
|
||||
|
||||
Reference in New Issue
Block a user