Added support for compress multiple files

This commit is contained in:
radikal
2020-08-02 18:13:30 +02:00
parent d71e11b4d0
commit ab780fd935
3 changed files with 12 additions and 9 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
###### Compress ###### Compress
``` ```
$ lch file.zip archive/ $ lch file.zip archive1/ [archive2/] [...]
``` ```
###### Decompress ###### Decompress
+8 -5
View File
@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
VERSION=0.1r7 VERSION=0.1r8
function decompressor() function decompressor()
{ {
@@ -125,19 +125,22 @@ else
echo "" echo ""
fi fi
if [ -z "$1" ] || [ -n "$3" ] if [ -z "$1" ]
then then
echo "Wrong arguments" echo "Wrong arguments"
echo "For more information run 'lch --help'"
echo "" echo ""
exit 0 help
exit 1
else else
if [ -n "$2" ] if [ -n "$2" ]
then then
echo "Compressor:" echo "Compressor:"
echo "-----------" echo "-----------"
echo "" echo ""
compressor $1 $2 DEST=$1
shift 1
ORIG=$@
compressor $DEST $ORIG
else else
echo "Decompressor:" echo "Decompressor:"
echo "-------------" echo "-------------"
+3 -3
View File
@@ -2,7 +2,7 @@
.SH NAME .SH NAME
lch \- command\-line compressor and decompressor for humans lch \- command\-line compressor and decompressor for humans
.SH SYNOPSIS .SH SYNOPSIS
\fBlch\fP [filename [filename]] \fBlch\fP [filename [filename1] [filename2]...]
\fBlch\fP [\fIflags\fP] \fBlch\fP [\fIflags\fP]
.SH DESCRIPTION .SH DESCRIPTION
@@ -37,8 +37,8 @@ Print current version.
will decompress file foobar.tar.gz will decompress file foobar.tar.gz
.TP .TP
\fBlch foobar.tar.gz foobar/\fP \fBlch foobar.tar.gz foobar1/ foobar2/\fP
will compress foobar/ in foobar.tar.gz will compress foobar1/ and foobar2/ in foobar.tar.gz
.SH BUGS .SH BUGS
Report your bugs at <gore@hatthieves.es> Report your bugs at <gore@hatthieves.es>