Linux Compressor Humanizer https://lch.hatthieves.es
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.3 KiB

3 years ago
5 years ago
3 years ago
5 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. #!/usr/bin/env bash
  2. VERSION=0.6r10
  3. DEST=$1
  4. shift 1
  5. ORIG=$@
  6. if [[ -e ./lib/resources.sh ]]; then . ./lib/resources.sh; else . /usr/lib/lch/resources.sh; fi
  7. if [[ -e ./lib/compressor.sh ]]; then . ./lib/compressor.sh; else . /usr/lib/lch/compressor.sh; fi
  8. if [[ -e ./lib/decompressor.sh ]]; then . ./lib/decompressor.sh; else . /usr/lib/lch/decompressor.sh; fi
  9. if [[ -e ./lib/installer.sh ]]; then . ./lib/installer.sh; else . /usr/lib/lch/installer.sh; fi
  10. if [ "$DEST" = "--version" ] || [ "$DEST" = "-v" ]
  11. then
  12. echo "Linux Compression Humanized $VERSION"
  13. exit 0
  14. else
  15. echo -e "\nlch $VERSION"
  16. echo -e "---------\n"
  17. case $DEST in
  18. "--help" | "-h")
  19. help
  20. ;;
  21. "--check" | "-c")
  22. check
  23. ;;
  24. "--install" | "-i")
  25. install $DEST $@
  26. ;;
  27. *)
  28. if [ -z "$DEST" ]
  29. then
  30. help
  31. exit 1
  32. else
  33. if [ -n "$ORIG" ]
  34. then
  35. echo "Compressor:"
  36. echo -e "-----------\n"
  37. compressor $DEST $ORIG
  38. else
  39. echo "Decompressor:"
  40. echo -e "-------------\n"
  41. decompressor $DEST
  42. fi
  43. fi
  44. ;;
  45. esac
  46. exit 0
  47. fi