summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fb.in10
-rw-r--r--fb.pod3
2 files changed, 11 insertions, 2 deletions
diff --git a/fb.in b/fb.in
index 2327bb6..7fc71a9 100644
--- a/fb.in
+++ b/fb.in
@@ -103,10 +103,10 @@ usage: [cat |] `basename "$0"` [switches] [options] [<file(s)|ID(s)|folder(s)>]
-v show the client version
Options:
- These have no effect if used in conjunction with a switch
-e <extension> extension for default highlighting (e.g. "diff")
-t upload a tar file containing all files (and directories)
-c compress the file being uploaded with gz or xz if used 2 times
+ When used in conjunction with -g this decompresses the download
!
}
@@ -146,7 +146,13 @@ if [ "$DELETE" ] || [ "$GET" ]; then
if [ "$DELETE" ]; then
$LIBDIR/fb-helper d "$PASTEBIN/file/delete/$i" || EXITCODE=1
elif [ "$GET" ]; then
- $LIBDIR/fb-helper d "$PASTEBIN/$i" || EXITCODE=1
+ if [ "$COMPRESS" = "1" ]; then
+ $LIBDIR/fb-helper d "$PASTEBIN/$i" | zcat || EXITCODE=1
+ elif [ "$COMPRESS" = "2" ]; then
+ $LIBDIR/fb-helper d "$PASTEBIN/$i" | xzcat || EXITCODE=1
+ else
+ $LIBDIR/fb-helper d "$PASTEBIN/$i" || EXITCODE=1
+ fi
fi
done
elif [ $# -eq 0 ]; then
diff --git a/fb.pod b/fb.pod
index ba96da1..cf8221e 100644
--- a/fb.pod
+++ b/fb.pod
@@ -62,6 +62,9 @@ If you want to be able to delete files, you have to add the following line to ~/
Specify this option once to use gzip or two times to use xz.
+ If used in conjunction with the -g switch this decompresses the download
+ before it's output to stdout.
+
=head1 EXAMPLES
fb -tc <folder> <file>