diff options
| author | Silvio Rhatto <rhatto@riseup.net> | 2024-11-02 16:00:04 -0300 | 
|---|---|---|
| committer | Silvio Rhatto <rhatto@riseup.net> | 2024-11-02 16:00:04 -0300 | 
| commit | 320ecb7fd56a84cba4165c53f1b29fd53840dd3f (patch) | |
| tree | 6908bff54951a5b9bcc56a00af0ba049d24b0a98 | |
| parent | f8e26738e0b649c16111c394fd86c894af61c481 (diff) | |
| download | kvmx-320ecb7fd56a84cba4165c53f1b29fd53840dd3f.tar.gz kvmx-320ecb7fd56a84cba4165c53f1b29fd53840dd3f.tar.bz2  | |
Fix: proper parameter handling in ssh/rsync actions
| -rwxr-xr-x | kvmx | 22 | 
1 files changed, 11 insertions, 11 deletions
@@ -1007,15 +1007,15 @@ function kvmx_sshdir {      #exit 1    fi -  DEST="$1" +  DEST="$*"    # Defaults to the current folder    if [ -z "$DEST" ]; then      DEST="`pwd`"      # Fix ~/ path -    if echo $DEST | grep -q -e "^$HOME"; then -      DEST="$(echo $DEST | sed -e "s|^$HOME|/home/$SSH_LOGIN|")" +    if echo "$DEST" | grep -q -e "^$HOME"; then +      DEST="$(echo "$DEST" | sed -e "s|^$HOME|/home/$SSH_LOGIN|")"      fi    fi @@ -1405,8 +1405,8 @@ function kvmx_rsync_to {    fi    # Fix ~/ path -  if echo $DEST | grep -q -e "^$HOME"; then -    DEST="$(echo $DEST | sed -e "s|^$HOME|/home/$SSH_LOGIN|")" +  if echo "$DEST" | grep -q -e "^$HOME"; then +    DEST="$(echo "$DEST" | sed -e "s|^$HOME|/home/$SSH_LOGIN|")"    fi    SSH="`cat $SSHFILE`" @@ -1442,8 +1442,8 @@ function kvmx_rsync_from {    fi    # Fix ~/ path -  if echo $ORIG | grep -q -e "^$HOME"; then -    ORIG="$(echo $ORIG | sed -e "s|^$HOME|/home/$SSH_LOGIN|")" +  if echo "$ORIG" | grep -q -e "^$HOME"; then +    ORIG="$(echo "$ORIG" | sed -e "s|^$HOME|/home/$SSH_LOGIN|")"    fi    SSH="`cat $SSHFILE`" @@ -1474,8 +1474,8 @@ function kvmx_scp_from {    fi    # Fix ~/ path -  if echo $ORIG | grep -q -e "^$HOME"; then -    ORIG="$(echo $ORIG | sed -e "s|^$HOME|/home/$SSH_LOGIN|")" +  if echo "$ORIG" | grep -q -e "^$HOME"; then +    ORIG="$(echo "$ORIG" | sed -e "s|^$HOME|/home/$SSH_LOGIN|")"    fi    SSH="`cat $SSHFILE`" @@ -1506,8 +1506,8 @@ function kvmx_scp_to {    fi    # Fix ~/ path -  if echo $DEST | grep -q -e "^$HOME"; then -    DEST="$(echo $DEST | sed -e "s|^$HOME|/home/$SSH_LOGIN|")" +  if echo "$DEST" | grep -q -e "^$HOME"; then +    DEST="$(echo "$DEST" | sed -e "s|^$HOME|/home/$SSH_LOGIN|")"    fi    SSH="`cat $SSHFILE`"  | 
