pstsrv: ensure newline after URL and inform failed upload

This commit is contained in:
Lucas 2020-07-02 03:09:10 +00:00
parent ec3f639580
commit bfe6426a9b

View File

@ -86,15 +86,18 @@ shift
check_runtime curl $torsocks
url=
[ $# -eq 0 ] && set -- -
case $srv in
catbox.moe)
do_upload pst_catbox_moe "$@"
url=$(do_upload pst_catbox_moe "$@")
;;
ix.io)
do_upload pst_ix_io "$@"
url=$(do_upload pst_ix_io "$@")
;;
*)
err "unknown service $srv"
;;
esac
[ $? -eq 0 ] || err "Couldn't upload files"
printf "%s\n" "$url"