Browse Source

Added support for compress multiple files

master
radikal 3 years ago
parent
commit
ab780fd935
3 changed files with 12 additions and 9 deletions
  1. +1
    -1
      README.md
  2. +8
    -5
      lch
  3. +3
    -3
      lch.1

+ 1
- 1
README.md View File

@ -2,7 +2,7 @@
###### Compress ###### Compress
``` ```
$ lch file.zip archive/
$ lch file.zip archive1/ [archive2/] [...]
``` ```
###### Decompress ###### Decompress


+ 8
- 5
lch 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
lch.1 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
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 .SH BUGS
Report your bugs at <gore@hatthieves.es> Report your bugs at <gore@hatthieves.es>


Loading…
Cancel
Save