From 9ed7e989478ae322d0e0fc9c41719c33c192ad80 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 4 Jun 2011 22:51:18 +0200 Subject: use -c for decompression when used with -g Signed-off-by: Florian Pritz --- fb.in | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'fb.in') 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] [] -v show the client version Options: - These have no effect if used in conjunction with a switch -e 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 -- cgit v1.2.3-24-g4f1b