build-pipe-viewer.sh 978 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env bash
  2. set -euo pipefail # bash strict mode
  3. if command -v rpm; then
  4. dependencies=(perl-libwww-perl perl-LWP-Protocol-https perl-Data-Dump
  5. perl-JSON perl-Gtk3 perl-File-ShareDir perl-Module-Build
  6. perl-Term-ReadLine-Gnu perl-JSON-XS perl-Unicode-LineBreak
  7. perl-Parallel-ForkManager perl-Memoize)
  8. elif command -v apt; then
  9. dependencies=(libwww-perl liblwp-protocol-https-perl
  10. libdata-dump-perl libjson-perl libmodule-build-perl
  11. libgtk3-perl libfile-sharedir-perl
  12. libterm-readline-gnu-perl libjson-xs-perl
  13. libunicode-linebreak-perl libtext-charwidth-perl)
  14. fi
  15. package-manager.sh install "${dependencies[@]}"
  16. cd /tmp
  17. wget https://github.com/trizen/pipe-viewer/archive/main.zip -O pipe-viewer-main.zip
  18. unzip -n pipe-viewer-main.zip
  19. cd pipe-viewer-main/
  20. perl Build.PL --gtk
  21. # perl Build.PL
  22. sudo ./Build installdeps
  23. sudo ./Build install