diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-08-13 19:03:54 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-08-13 19:03:54 +0200 |
commit | ad9b844dca04e612b31bbf16b231149b86b09e3a (patch) | |
tree | a5e84f500d6fac81c876c7dc8e0bd6c80164129f | |
parent | 03efa9e1afc9f5da529407923e8fae999718d2de (diff) |
put: moar escaping
-rw-r--r-- | etc/functions/put | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/etc/functions/put b/etc/functions/put index 300be7b..6e4069c 100644 --- a/etc/functions/put +++ b/etc/functions/put @@ -98,8 +98,11 @@ while (( ${#hosts} )) { } 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} + remote_file=${remote_file// /%20} + remote_file=${remote_file//\#/%23} + url=${server_prefix}${remote_file} + if $(curl -fI ${server_prefix}${remote_file} &> /dev/null); then + echo ${server_prefix}${remote_file} return 0 fi } |