common.sh 674 B

12345678910111213141516171819202122232425
  1. #!/bin/bash -e
  2. # Linux build only
  3. install_linux_deps() {
  4. local pkgs=(libirrlicht-dev cmake libbz2-dev libpng-dev \
  5. libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev \
  6. libhiredis-dev libogg-dev libgmp-dev libvorbis-dev libopenal-dev \
  7. gettext libpq-dev postgresql-server-dev-all libleveldb-dev \
  8. libcurl4-openssl-dev)
  9. sudo apt-get update
  10. sudo apt-get install -y --no-install-recommends ${pkgs[@]} "$@"
  11. }
  12. # Mac OSX build only
  13. install_macosx_deps() {
  14. brew update
  15. brew install freetype gettext hiredis irrlicht leveldb libogg libvorbis luajit
  16. if brew ls | grep -q jpeg; then
  17. brew upgrade jpeg
  18. else
  19. brew install jpeg
  20. fi
  21. #brew upgrade postgresql
  22. }