install_nblood.sh 794 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/ksh
  2. doas pkg_add automake-1.16.5 autoconf-2.71 gcc-11.2.0p9 gmake nasm sdl2 sdl2-net sdl2-mixer flac libvpx unzip gtk+2 gdk-pixbuf2 libxmp lz4 xz libvorbis
  3. application=NBlood
  4. repository=https://github.com/nukeykt/NBlood.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. gmake CXX=eg++ USE_OPENGL=1 POLYMER=1 HAVE_GTK2=1 STARTUP_WINDOW=0 USE_LIBVPX=1 CLANG=1 RELEASE=1
  29. fi