pstsrv: ensure newline after URL and inform failed upload
This commit is contained in:
parent
ec3f639580
commit
bfe6426a9b
1 changed files with 5 additions and 2 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue