Advertisement
Guest User

1

a guest
Jan 12th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. #!/bin/bash
  2. # GOG.com (www.gog.com)
  3. # Mount And Blade - Warband
  4.  
  5. # Initialization
  6. CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  7. cd "${CURRENT_DIR}"
  8. source support/gog_com.shlib
  9.  
  10. # Game info
  11. GAME_NAME="$(get_gameinfo 1)"
  12. VERSION="$(get_gameinfo 2)"
  13. VERSION_DEV="$(get_gameinfo 3)"
  14.  
  15. # Actions
  16. run_game() {
  17. echo "Running ${GAME_NAME}"
  18. local bin32_name="mb_warband.sh"
  19. local bin64_name="$bin32_name"
  20. local bin_path32="$CURRENT_DIR/game/"
  21. local bin_path64="$bin_path32"
  22. local lib_path32="$CURRENT_DIR/game/"
  23. local lib_path64="$lib_path32"
  24. execute_game "${bin32_name}" "${bin64_name}" "${bin_path32}" "${bin_path64}" "${lib_path32}" "${lib_path64}"
  25. }
  26.  
  27. run_config() {
  28. echo "Running ${GAME_NAME} config"
  29. local bin32_name="mbw_config.sh"
  30. local bin64_name="$bin32_name"
  31. local bin_path32="$CURRENT_DIR/game/"
  32. local bin_path64="$bin_path32"
  33. local lib_path32="$CURRENT_DIR/game/"
  34. local lib_path64="$lib_path32"
  35. execute_game "${bin32_name}" "${bin64_name}" "${bin_path32}" "${bin_path64}" "${lib_path32}" "${lib_path64}"
  36. }
  37.  
  38. default() {
  39. run_game
  40. }
  41.  
  42. # Options
  43. define_option "-s" "--start" "start ${GAME_NAME}" "run_game" "$@"
  44. define_option "-g" "--config" "start ${GAME_NAME} config" "run_config" "$@"
  45.  
  46. # Defaults
  47. standard_options "$@"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement