devuan-post_install_script-games.sh 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. options=(Y y N n)
  11. # Section: games
  12. read -rp "install games?: (y|n)" option
  13. while [[ " "${options[@]}" " != *" $option "* ]]; do
  14. echo "$option: not recognized. Valid options are:"
  15. echo "${options[@]/%/,}"
  16. read -rp "?: (y|N)" option
  17. done
  18. if [[ "$option" == "y" || "$option" == "Y" ]]; then
  19. ./install_repo_games.sh
  20. fi
  21. # Section: angband
  22. read -rp "install angband?: (y|n)" option
  23. while [[ " "${options[@]}" " != *" $option "* ]]; do
  24. echo "$option: not recognized. Valid options are:"
  25. echo "${options[@]/%/,}"
  26. read -rp "?: (y|N)" option
  27. done
  28. if [[ "$option" == "y" || "$option" == "Y" ]]; then
  29. ./install_angband.sh
  30. fi
  31. # Section: frogcomposband
  32. read -rp "install frogcomposband?: (y|n)" option
  33. while [[ " "${options[@]}" " != *" $option "* ]]; do
  34. echo "$option: not recognized. Valid options are:"
  35. echo "${options[@]/%/,}"
  36. read -rp "?: (y|N)" option
  37. done
  38. if [[ "$option" == "y" || "$option" == "Y" ]]; then
  39. ./install_frogcomposband.sh
  40. fi
  41. # Section: quakeinjector
  42. read -rp "install quakeinjector?: (y|n)" option
  43. while [[ " "${options[@]}" " != *" $option "* ]]; do
  44. echo "$option: not recognized. Valid options are:"
  45. echo "${options[@]/%/,}"
  46. read -rp "?: (y|N)" option
  47. done
  48. if [[ "$option" == "y" || "$option" == "Y" ]]; then
  49. ./install_quakeinjector.sh
  50. fi
  51. # Section: prboom-plus
  52. read -rp "install prboom-plus?: (y|n)" option
  53. while [[ " "${options[@]}" " != *" $option "* ]]; do
  54. echo "$option: not recognized. Valid options are:"
  55. echo "${options[@]/%/,}"
  56. read -rp "?: (y|N)" option
  57. done
  58. if [[ "$option" == "y" || "$option" == "Y" ]]; then
  59. ./install_prboom-plus.sh
  60. fi
  61. # Section: gzdoom
  62. read -rp "install gzdoom?: (y|n)" option
  63. while [[ " "${options[@]}" " != *" $option "* ]]; do
  64. echo "$option: not recognized. Valid options are:"
  65. echo "${options[@]/%/,}"
  66. read -rp "?: (y|N)" option
  67. done
  68. if [[ "$option" == "y" || "$option" == "Y" ]]; then
  69. ./install_gzdoom.sh
  70. fi
  71. # Section: build engine games
  72. read -rp "install build engine games?: (y|n)" option
  73. while [[ " "${options[@]}" " != *" $option "* ]]; do
  74. echo "$option: not recognized. Valid options are:"
  75. echo "${options[@]/%/,}"
  76. read -rp "?: (y|N)" option
  77. done
  78. if [[ "$option" == "y" || "$option" == "Y" ]]; then
  79. ./install_eduke32.sh
  80. ./install_nblood.sh
  81. fi
  82. # Section: alephone
  83. read -rp "install alephone?: (y|n)" option
  84. while [[ " "${options[@]}" " != *" $option "* ]]; do
  85. echo "$option: not recognized. Valid options are:"
  86. echo "${options[@]/%/,}"
  87. read -rp "?: (y|N)" option
  88. done
  89. if [[ "$option" == "y" || "$option" == "Y" ]]; then
  90. ./install_alephone.sh
  91. fi
  92. # Section: Add user to games group
  93. read -rp "Add user to games group?: (Y|n)" option
  94. while [[ " "${options[@]}" " != *" $option "* ]]; do
  95. echo "$option: not recognized. Valid options are:"
  96. echo "${options[@]/%/,}"
  97. read -rp "?: (y|N)" option
  98. done
  99. if [[ "$option" == "y" || "$option" == "Y" ]]; then
  100. ./add_user_to_games_group.sh
  101. fi