diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/functions/put | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/functions/put b/etc/functions/put index 62aaebc..f15274d 100644 --- a/etc/functions/put +++ b/etc/functions/put @@ -112,10 +112,10 @@ while (( ${#hosts} )) { if [[ ${remote_file} == ${~illegal} ]] { remote_file=${remote_file:r} } - lftp -c "connect sftp://${ssh_name}; cd ${target_dir}; put ${file}"\ -" -o ${remote_file}; chmod 644 ${remote_file}" - if $(curl -fI ${server_prefix}${remote_file} &> /dev/null); then - echo ${server_prefix}${remote_file} + lftp -c "connect sftp://${ssh_name}; cd ${target_dir}; put '${file}'"\ +" -o '${remote_file}'; chmod 644 '${remote_file}'" + if $(curl -fI ${server_prefix}${remote_file// /%20} &> /dev/null); then + echo ${server_prefix}${remote_file// /%20} return 0 fi } |