Guest User

doomlauncher

a guest
Jun 20th, 2017
95
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. # Easily launch doom games with prboom-plus
  3. # Additional wads launched from utilitywads dir (see last $exec)
  4. EXEC='prboom-plus'
  5. DIR='/home/riley/games/wads'
  6. LAST='/home/riley/bin/doom_last_played'
  7. ################### START ################################3
  8. # check for additonal wads $1,$2 etc
  9. if [[ -n "$1" ]];then
  10. OTHER1=$(pwd)/$1
  11. fi
  12. if [[ -n "$2" ]];then
  13. OTHER2=$(pwd)/$2
  14. fi
  15. if [[ -n "$3" ]];then
  16. OTHER3=$(pwd)/$3
  17. fi
  18. #########################################################
  19. clear
  20. figlet DooM
  21. echo "** Prboom-plus PWAD loader **"
  22. echo
  23. # Get IWAD selection
  24. echo "Please select an IWAD to load ..."
  25. select iwad in Doom Doom2 BTSX1 Tnt Plutonia Freedoom Freedoom2 Heretic Hexen; do
  26. case $iwad in
  27.  
  28. Doom)
  29. IWAD=$DIR/doom.wad
  30. ;;
  31. Doom2)
  32. IWAD=$DIR/doom2.wad
  33. ;;
  34. Tnt)
  35. IWAD=$DIR/tnt.wad
  36. ;;
  37. Plutonia)
  38. IWAD=$DIR/plutonia.wad
  39. ;;
  40. Freedoom)
  41. IWAD=$DIR/freedoom1.wad
  42. ;;
  43. Freedoom2)
  44. IWAD=$DIR/freedoom2.wad
  45. ;;
  46. Heretic)
  47. DIR='/home/riley/games/wads/heretic'
  48. IWAD=$DIR/heretic.wad
  49. LAST='/home/riley/bin/heretic_last_played'
  50. ;;
  51. Hexen)
  52. DIR='/home/riley/games/wads/hexen'
  53. IWAD=$DIR/hexen.wad
  54. MUS='/home/riley/games/wads/utilitywads/sycraft-hexen-high.wad'
  55. LAST='/home/riley/bin/hexen_last_played'
  56. ;;
  57. BTSX1)
  58. $EXEC -iwad $DIR/doom2.wad -file $DIR/btsx_e1* $DIR/utilitywads/prboom/*
  59. exit
  60. esac
  61. # Get pwads
  62. clear
  63. echo "** Config: $config **"
  64. echo "Please select a PWAD to load"
  65. echo
  66. select pwad in $(cat $LAST) None Quit $(ls $DIR/*.wad) ; do
  67. case $pwad in
  68. $LAST)
  69. pwad=$LAST
  70. echo $pwad > $LAST
  71. ;;
  72. None)
  73. pwad=none
  74. ;;
  75. Quit)
  76. echo "Goodbye!"
  77. exit 0
  78. ;;
  79. # if pwad selected: write to last played
  80. *)
  81. echo $pwad > $LAST
  82. ;;
  83.  
  84. esac
  85. case $config in
  86. Heretic)
  87. $EXEC -iwad $DIR/$IWAD -file $pwad $OTHER
  88. echo "Goodbye!"
  89. exit 0
  90. ;;
  91. Hexen)
  92. $EXEC -iwad $DIR/$IWAD -file $pwad $OTHER $MUS
  93. echo "Goodbye!"
  94. exit 0
  95. ;;
  96. Freedoom)
  97. $EXEC -iwad $DIR/$IWAD -file $pwad
  98. echo "Goodbye!"
  99. exit 0
  100. ;;
  101. Freedoom2)
  102. $EXEC -iwad $DIR/$IWAD -file $pwad
  103. echo "Goodbye!"
  104. exit 0
  105. ;;
  106. # if anything else declared, use default config
  107. *)
  108. clear
  109. $EXEC -iwad $IWAD -file $pwad $DIR/utilitywads/prboom/* $OTHER1 $OTHER2 $OTHER3
  110. echo "Goodbye!"
  111. exit 0
  112. ;;
  113. esac
  114. done
  115. done
RAW Paste Data