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