install_requirements.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/bash
  2. # these scripts written in GNU bash; version 5.0.16(1)-release (x86_64-pc-linux-gnu)
  3. # and version 5.0.17(1)-release (x86_64-redhat-linux-gnu)
  4. # and version 4.4.19(1)-release (x86_64-redhat-linux-gnu)
  5. # and version 5.1.0(1)-release (aarch64-linux-android)
  6. function guide() {
  7. echo "usage: ./`basename $0` [debian | rhel | termux]"
  8. echo "use debian option to apt based distros, such as Ubuntu."
  9. echo -e "use rhel option to dnf based distros, such as Fedora."
  10. echo -e "use termux option to android termux.\n"
  11. echo "this generator tested under debian and fedora."
  12. exit 0;
  13. }
  14. debian(){
  15. apt-get update && \
  16. apt-get install \
  17. ghostscript imagemagick libimage-exiftool-perl sqlite3 coreutils nginx pdfinfo bc recode
  18. # libio-compress-perl libdigest-sha-perl
  19. }
  20. rhel() {
  21. dnf install \
  22. ghostscript ImageMagick perl-Image-ExifTool sqlite coreutils nginx poppler-utils podman-docker perl-IO-Compress perl-Digest-SHA bc recode
  23. }
  24. termux() {
  25. pkg update && \
  26. pkg install \
  27. wget git tor ghostscript imagemagick exiftool sqlite coreutils nginx poppler bc
  28. # recode does not exist on termux repos.
  29. }
  30. if [ "$#" -lt 1 ]; then
  31. guide;
  32. fi
  33. $1