Añadida página man y cambios en install.sh y lch
This commit is contained in:
+22
@@ -1,3 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$UID" != "0" ]; then
|
||||
echo " Only root can execute this script, sorry."
|
||||
echo " Try 'sudo ./install.sh'"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "======================"
|
||||
echo " Installing lch"
|
||||
echo "======================"
|
||||
echo ""
|
||||
cp lch /usr/bin/lch
|
||||
echo " Copied lch in /usr/bin"
|
||||
cp lch.1 /usr/man/man1/lch.1
|
||||
gzip /usr/man/man1/lch.1
|
||||
echo " Copied manpage in /usr/man/man1"
|
||||
echo ""
|
||||
echo "============================="
|
||||
echo " lch installed successfully."
|
||||
echo "============================="
|
||||
echo ""
|
||||
echo "Run 'lch --help' to see options."
|
||||
exit 0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
VERSION=0.1r6
|
||||
VERSION=0.1r7
|
||||
|
||||
if [ "$1" = "version" ] || [ "$1" = "--version" ] || [ "$1" = "-v" ]
|
||||
then
|
||||
@@ -12,7 +12,7 @@ else
|
||||
echo ""
|
||||
fi
|
||||
|
||||
function descompressor()
|
||||
function decompressor()
|
||||
{
|
||||
case $1 in
|
||||
*.tar)
|
||||
@@ -40,7 +40,7 @@ function descompressor()
|
||||
7za e $1
|
||||
;;
|
||||
*)
|
||||
echo "Extent not found."
|
||||
echo "Extension not found."
|
||||
echo "For more information --help"
|
||||
echo ""
|
||||
;;
|
||||
@@ -118,6 +118,14 @@ then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$1" = "version" ] || [ "$1" = "--version" ] || [ "$1" = "-v" ]
|
||||
then
|
||||
echo ""
|
||||
echo "lch $VERSION"
|
||||
echo ""
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -z "$1" ] || [ -n "$3" ]
|
||||
then
|
||||
echo "Wrong arguments"
|
||||
@@ -132,9 +140,9 @@ else
|
||||
echo ""
|
||||
compressor $1 $2
|
||||
else
|
||||
echo "Descompressor:"
|
||||
echo "Decompressor:"
|
||||
echo "--------------"
|
||||
echo ""
|
||||
descompressor $1
|
||||
decompressor $1
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
.TH LCH 1 "15 July 2020"
|
||||
.SH NAME
|
||||
lch \- command\-line compressor and decompressor for humans
|
||||
.SH SYNOPSIS
|
||||
\fBlch\fP [\fIflags\fP] [filename [filename]] ...
|
||||
|
||||
.SH DESCRIPTION
|
||||
\fBlch\fP is a command\-line compressor and decompressor for humans with
|
||||
simplicity in mind. Automatically select the compression format by file
|
||||
extension.
|
||||
|
||||
Supported extensions:
|
||||
|
||||
- tar
|
||||
- tar.gz
|
||||
- tar.bz2
|
||||
- tar.xz
|
||||
- bz2
|
||||
- tgz
|
||||
- gz
|
||||
- zip
|
||||
- 7z
|
||||
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fIhelp, \-h, \-\-help\fP
|
||||
Help: show syntax.
|
||||
.TP
|
||||
\fIversion, \-v, \-\-version\fP
|
||||
Print current version.
|
||||
|
||||
.SH EXAMPLES
|
||||
|
||||
.TP
|
||||
\fBlch foobar.tar.gz\fR
|
||||
will decompress file foobar.tar.gz
|
||||
|
||||
.TP
|
||||
\fBlch foobar.tar.gz foobar/\fP
|
||||
will compress foobar/ in foobar.tar.gz
|
||||
|
||||
.SH BUGS
|
||||
Report your bugs at <gore@hatthieves.es>
|
||||
|
||||
.SH AUTHOR
|
||||
\fBlch\fP are by Gustavo Adolfo Mesa Roldan <gore@hackthieves.es.>
|
||||
|
||||
This document is by radikal <radikal@disroot.org>.
|
||||
|
||||
Reference in New Issue
Block a user