From 26d11433f13e69e71c431d021fc1a32d902d2247 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 19 Feb 2014 22:41:22 +0100 Subject: Support combining -n and -t to set the tarball name This does change the default from upload to stdin, but I don't care. Signed-off-by: Florian Pritz --- fb.1 | 2 +- fb.in | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fb.1 b/fb.1 index 46d139d..2f8696d 100644 --- a/fb.1 +++ b/fb.1 @@ -87,7 +87,7 @@ will try to extract the ID. Display a short help message. .It Fl t Upload a tar file containing all files and directories specified on the -command line. +command line. The file name can be specified with the -n option. (don't add any extensions) .It Fl v Display the client version. .It Fl D diff --git a/fb.in b/fb.in index e14fa31..660ed00 100644 --- a/fb.in +++ b/fb.in @@ -143,13 +143,13 @@ is_url() { do_tar_upload() { if [ "$compress" = "1" ]; then - file="$tmpdir/upload.tar.gz" + file="$tmpdir/$filename.tar.gz" tar -cf - -- "$@" | gzip -n -c > "$file" || return 1 elif [ "$compress" = "2" ]; then - file="$tmpdir/upload.tar.xz" + file="$tmpdir/$filename.tar.xz" tar -cf - -- "$@" | xz -c > "$file" || return 1 else - file="$tmpdir/upload.tar" + file="$tmpdir/$filename.tar" tar -cf "$file" -- "$@" || return 1 fi compress=0 -- cgit v1.2.3-24-g4f1b