install_alephone_latest.sh 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. #!/bin/bash
  2. # fail if any commands fails
  3. set -e
  4. # debug log
  5. #set -x
  6. # Set superuser privileges command if not set
  7. if [[ -z $su ]]; then
  8. export su="sudo"
  9. fi
  10. $su apt-get install -y build-essential cmake libboost-all-dev libsdl1.2-dev libsdl-image1.2-dev \
  11. libsdl-net1.2-dev libsdl-ttf2.0-dev libspeexdsp-dev libzzip-dev \
  12. libavcodec-dev libavformat-dev libavutil-dev libswscale-dev
  13. application=alephone
  14. if [ ! -f ~/src/$application ]; then
  15. cd ~/src || return
  16. curl -o AlephOne-stable.tar.bz2 -L https://alephone.lhowon.org/download/source.php
  17. tar xjvf AlephOne-stable.tar.bz2
  18. # main directory
  19. mv AlephOne-*/ $application
  20. cd $application
  21. ./configure
  22. make
  23. fi
  24. # games data
  25. if [ ! -d ~/games/alephone ]; then
  26. mkdir -p ~/games/alephone
  27. cd ~/games/alephone
  28. curl -s https://api.github.com/repos/Aleph-One-Marathon/alephone/releases/latest | jq -r ".assets[] | select(.name | test(\"Data.zip\")) | .browser_download_url" | xargs -n1 curl -OL
  29. if [ ! -d marathon ]; then
  30. unzip Marathon-*-Data.zip -d marathon
  31. mv marathon/Marathon/* marathon/
  32. rm -rf marathon/Marathon
  33. fi
  34. if [ ! -d marathon2 ]; then
  35. unzip Marathon2-*-Data.zip -d marathon2
  36. mv marathon2/Marathon\ 2/* marathon2/
  37. rm -rf marathon2/Marathon\ 2
  38. fi
  39. if [ ! -d infinity ]; then
  40. unzip MarathonInfinity-*-Data.zip -d infinity
  41. mv infinity/Marathon\ Infinity/* infinity/
  42. rm -rf infinity/Marathon\ Infinity
  43. fi
  44. if [ ! -d marathon_red ]; then
  45. curl -OL "http://files3.bungie.org/trilogy/MarathonRED.zip"
  46. unzip MarathonRED.zip -d marathon_red
  47. mv marathon_red/Marathon\ RED/* marathon_red/
  48. rm -rf marathon_red/Marathon\ RED
  49. fi
  50. if [ ! -d rubicon_x ]; then
  51. curl -OL "http://files5.bungie.org/marathon/marathonRubiconX.zip"
  52. unzip marathonRubiconX.zip -d rubicon_x/
  53. mv rubicon_x/Rubicon\ X\ ƒ/* rubicon_x/
  54. rm -rf rubicon_x/__MACOSX/ rubicon_x/Rubicon\ X\ ƒ/
  55. fi
  56. if [ ! -d phoenix ]; then
  57. curl -o "Marathon_Phoenix.zip" -L "http://simplici7y.com/items/marathon-phoenix-2/download"
  58. unzip Marathon_Phoenix.zip -d phoenix/
  59. mv phoenix/Marathon\ Phoenix/* phoenix/
  60. rm -rf phoenix/Marathon\ Phoenix/
  61. fi
  62. if [ ! -d eternal ]; then
  63. curl -OL "http://eternal.bungie.org/files/_releases/EternalXv121.zip"
  64. unzip EternalXv121.zip -d eternal/
  65. mv eternal/Eternal\ 1.2.1/* eternal/
  66. rm -rf eternal/__MACOSX/ eternal/Eternal\ 1.2.1/
  67. fi
  68. if [ ! -d evil ]; then
  69. curl -OL "http://files3.bungie.org/trilogy/MarathonEvil.zip"
  70. unzip MarathonEvil.zip -d evil/
  71. mv evil/Marathon\ EVIL/* evil/
  72. rm -rf evil/Marathon\ EVIL/
  73. fi
  74. if [ ! -d pathways_into_darkness ]; then
  75. curl -o "AOPID_v1.2.zip" -L "https://simplici7y.com/items/aleph-one-pathways-into-darkness/download"
  76. unzip AOPID_v1.2.zip -d pathways_into_darkness/
  77. mv pathways_into_darkness/AOPID_v1.2/* pathways_into_darkness/
  78. rm -rf pathways_into_darkness/AOPID_v1.2/
  79. fi
  80. fi