summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
}