Files
lch/lch
T

50 lines
1.3 KiB
Bash
Raw Normal View History

2020-09-30 01:37:15 +02:00
#!/usr/bin/env bash
2020-10-03 16:40:38 +02:00
VERSION=0.6r11
2020-08-02 19:29:30 +02:00
DEST=$1
shift 1
ORIG=$@
2019-02-22 17:20:27 +01:00
2020-10-03 08:30:27 +02:00
if [[ -e ./lib/resources.sh ]]; then . ./lib/resources.sh; else . /usr/lib/lch/resources.sh; fi
if [[ -e ./lib/compressor.sh ]]; then . ./lib/compressor.sh; else . /usr/lib/lch/compressor.sh; fi
if [[ -e ./lib/decompressor.sh ]]; then . ./lib/decompressor.sh; else . /usr/lib/lch/decompressor.sh; fi
if [[ -e ./lib/installer.sh ]]; then . ./lib/installer.sh; else . /usr/lib/lch/installer.sh; fi
2019-02-22 17:20:27 +01:00
2020-08-02 19:29:30 +02:00
if [ "$DEST" = "--version" ] || [ "$DEST" = "-v" ]
2020-09-30 03:25:20 +02:00
then
2020-07-16 03:02:56 +02:00
echo "Linux Compression Humanized $VERSION"
exit 0
else
2020-09-27 00:14:29 +02:00
echo -e "\nlch $VERSION"
echo -e "---------\n"
2020-09-30 03:25:20 +02:00
case $DEST in
"--help" | "-h")
help
;;
"--check" | "-c")
check
;;
"--install" | "-i")
install $DEST $@
;;
*)
if [ -z "$DEST" ]
then
help
exit 1
else
if [ -n "$ORIG" ]
then
echo "Compressor:"
echo -e "-----------\n"
compressor $DEST $ORIG
else
echo "Decompressor:"
echo -e "-------------\n"
decompressor $DEST
fi
fi
;;
esac
2020-09-30 19:59:07 +02:00
exit 0
2020-09-27 00:14:29 +02:00
fi