pstsrv: ensure newline after URL and inform failed upload
This commit is contained in:
parent
ec3f639580
commit
bfe6426a9b
@ -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…
Reference in New Issue
Block a user