summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-07-27 16:46:43 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-07-27 16:46:43 +0200
commit538811e6677a73ac925b83bccf268af8ddab5aa0 (patch)
tree738a40b2ea0504c0102f0a334065544519791b5d
parent0e6959e1fc8bfc0894fef5ca730f000cd10c7818 (diff)
Automatically create multipastev1.5.0
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--fb.17
-rw-r--r--fb.in4
2 files changed, 9 insertions, 2 deletions
diff --git a/fb.1 b/fb.1
index 918ae84..e548502 100644
--- a/fb.1
+++ b/fb.1
@@ -28,7 +28,9 @@
is a client to https://paste.xinu.at which allows the user to easily upload,
delete or download files.
By default, files will be uploaded as-is and a link to the file will be printed
-to stdout after each upload.
+to stdout after each upload. If multiple files are uploaded a multipaste ( see
+.Fl m
+) will be created automatically.
.Pp
Directories will be packed into a tarball with
.Xr tar 1 and the resulting
@@ -88,7 +90,8 @@ Create a multipaste of the IDs/files/directories/URLs. This uploads files as
always, but then creates a multipaste combining all of them. URLs starting with
the pastebin URL will have their ID extracted and will not be downloaded. Only
the multipaste URL will be copied to the clipboard, but all URLs will be
-displayed while uploading.
+displayed while uploading. This option is enabled automatically if multiple
+files are uploaded.
.It Fl h
Display a short help message.
.It Fl t
diff --git a/fb.in b/fb.in
index 69159de..9fe6392 100644
--- a/fb.in
+++ b/fb.in
@@ -347,6 +347,10 @@ done
shift `expr $OPTIND - 1`
+if [[ "$#" -gt 1 && ! "$tar" ]]; then
+ multipaste=1
+fi
+
if [ "$compress" = "1" ]; then
require_executable gzip
elif [ "$compress" = "2" ]; then