summaryrefslogtreecommitdiff
path: root/etc/functions/put
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-08-13 19:03:54 +0200
committerDaniel Friesel <derf@finalrewind.org>2020-08-13 19:03:54 +0200
commitad9b844dca04e612b31bbf16b231149b86b09e3a (patch)
treea5e84f500d6fac81c876c7dc8e0bd6c80164129f /etc/functions/put
parent03efa9e1afc9f5da529407923e8fae999718d2de (diff)
put: moar escaping
Diffstat (limited to 'etc/functions/put')
-rw-r--r--etc/functions/put7
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
}