install_freedoom-git.ksh 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/bin/ksh
  2. doas pkg_add cmake gmake py3-Pillow
  3. print "INFO: Requires deutex as build dependency, installing..."
  4. #./install_deutex.ksh
  5. #print "INFO: Requires deutex as build dependency, installing... DONE"
  6. application=freedoom
  7. repository=https://github.com/freedoom/freedoom.git
  8. export compile=
  9. mkdir -p ~/src
  10. cd ~/src || return
  11. if [ ! -d $application ]; then
  12. git clone $repository
  13. cd $application || return
  14. export compile=true
  15. else
  16. cd $application || return
  17. #git pull
  18. pwd
  19. git fetch
  20. LOCAL=$(git rev-parse HEAD)
  21. REMOTE=$(git rev-parse @{u})
  22. if [ ! $LOCAL = $REMOTE ]; then
  23. pwd
  24. echo "Need to pull"
  25. git pull
  26. export compile=true
  27. fi
  28. fi
  29. if [ "$compile" = "true" ]; then
  30. cd ~/src/$application || return
  31. gmake -j4 DEUTEX=$HOME/src/deutex/src/deutex
  32. mkdir -p $HOME/games/doom/wads/iwads/
  33. mv ./wads/freedm.wad $HOME/games/doom/wads/iwads/freedm-git.wad
  34. mv ./wads/freedoom1.wad $HOME/games/doom/wads/iwads/freedoom1-git.wad
  35. mv ./wads/freedoom2.wad $HOME/games/doom/wads/iwads/freedoom2-git.wad
  36. fi