install_crispy-doom.sh 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/ksh
  2. doas pkg_add cmake gmake sdl2 sdl2-net sdl2-mixer libsamplerate png
  3. application=crispy-doom
  4. repository=https://github.com/fabiangreffrath/crispy-doom.git
  5. export compile=
  6. mkdir -p ~/src
  7. cd ~/src || return
  8. if [ ! -d $application ]; then
  9. git clone $repository
  10. cd $application || return
  11. export compile=true
  12. else
  13. cd $application || return
  14. #git pull
  15. pwd
  16. git fetch
  17. LOCAL=$(git rev-parse HEAD)
  18. REMOTE=$(git rev-parse @{u})
  19. if [ ! $LOCAL = $REMOTE ]; then
  20. pwd
  21. echo "Need to pull"
  22. git pull
  23. export compile=true
  24. fi
  25. fi
  26. if [ "$compile" = "true" ]; then
  27. cd ~/src/$application || return
  28. echo ""
  29. echo "NOTE: If getting a 'Provide an AUTOMAKE_VERSION environment variable, please' error do this:"
  30. echo "$ export AUTOMAKE_VERSION=1.16 # <- (version without minor number 1.16.5 > 1.16)"
  31. echo "$ export AUTOCONF_VERSION=2.71 # <- (version without minor number 2.71p3 > 2.71)"
  32. echo ""
  33. export AUTOMAKE_VERSION=1.16
  34. export AUTOCONF_VERSION=2.71
  35. autoreconf -fiv
  36. ./configure
  37. gmake
  38. fi