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
1 changed files with 5 additions and 2 deletions

View File

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