Skip to content

Commit

Permalink
kiss-vm cpto,cpfrom: output scp cmdline while get -v option
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhong Yin <[email protected]>
  • Loading branch information
tcler committed Aug 16, 2023
1 parent dc3cf74 commit db6efe4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kiss-vm
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,9 @@ vmcopyto() {

sshOpts=$(sshtest $U@$_addr "$sshOpts")
case $? in 0) sshstat=yes;; 1) sshstat=passwd;; esac
[[ "$VERBOSE" = yes && $sshstat != unavailable ]] && {
echo -e "\E[01;36m[HOST]> scp $sshOpts -r ${srcarray[@]} $U@${_addr}:$dstdir/.\E[0m" >&2
}
if [[ $sshstat = yes ]]; then
scp $sshOpts -r "${srcarray[@]}" $U@${_addr}:$dstdir/.
rc=$?
Expand Down Expand Up @@ -960,6 +963,9 @@ vmcopyfrom() {

sshOpts=$(sshtest $U@$_addr "$sshOpts")
case $? in 0) sshstat=yes;; 1) sshstat=passwd;; esac
[[ "$VERBOSE" = yes && $sshstat != unavailable ]] && {
echo -e "\E[01;36m[HOST]> scp $sshOpts -r $U@${_addr}:$src $dstf\E[0m" >&2
}
if [[ $sshstat = yes ]]; then
scp $sshOpts -r $U@${_addr}:$src $dstf
rc=$?
Expand Down

0 comments on commit db6efe4

Please sign in to comment.