Advertisement
Guest User

Untitled

a guest
Jun 25th, 2016
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. SCRIPT="$0"
  4.  
  5. # Resolve the chain of symlinks leading to this script.
  6. while [ -L "$SCRIPT" ] ; do
  7. LINK=$(readlink "$SCRIPT")
  8.  
  9. case "$LINK" in
  10. /*)
  11. SCRIPT="$LINK"
  12. ;;
  13. *)
  14. SCRIPT="$(dirname "$SCRIPT")/$LINK"
  15. ;;
  16. esac
  17. done
  18.  
  19. # The directory containing this shell script - an absolute path.
  20. ROOT=$(dirname "$SCRIPT")
  21. ROOT=$(cd "$ROOT"; pwd)
  22.  
  23. # The name of this shell script without the .sh on the end.
  24. BASEFILE=$(basename "$SCRIPT" .sh)
  25.  
  26. if [ -z "$RENPY_PLATFORM" ] ; then
  27. case "$(uname -s)-$(uname -m)" in
  28. Darwin-*)
  29. RENPY_PLATFORM="darwin-x86_64"
  30. ROOT1="$ROOT/../Resources/autorun"
  31. ROOT2="$ROOT/../../.."
  32. ;;
  33. *-x86_64|amd64)
  34. RENPY_PLATFORM="linux-x86_64"
  35. ROOT1="$ROOT"
  36. ROOT2="$ROOT"
  37. ;;
  38. *-i*86)
  39. RENPY_PLATFORM="linux-i686"
  40. ROOT1="$ROOT"
  41. ROOT2="$ROOT"
  42. ;;
  43. *)
  44. echo "Ren'Py could not detect that platform it's running on. Please set"
  45. echo "the RENPY_PLATFORM environment variable to one of \"linux-i686\" or"
  46. echo "\"linux-x86_64\", or \"darwin-x86_64\" and run this command again."
  47. exit 1
  48. ;;
  49. esac
  50. fi
  51.  
  52.  
  53. for BASE in "$ROOT" "$ROOT1" "$ROOT2"; do
  54. LIB="$BASE/lib/$RENPY_PLATFORM"
  55. if test -d "$LIB"; then
  56. break
  57. fi
  58. done
  59.  
  60. exec $RENPY_GDB "$LIB/$BASEFILE" $RENPY_PYARGS -EO "$BASE/$BASEFILE.py" "$@"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement