Advertisement
Guest User

Patch for osu aur package

a guest
Aug 9th, 2018
505
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.68 KB | None | 0 0
  1. 1c1
  2. < #!/bin/sh
  3. ---
  4. > #!/bin/bash
  5. 8c8,19
  6. < function doinstall {
  7. ---
  8. > readkey() {
  9. >     [ 1 -le $# ] && printf '%s' "$1"
  10. >     stty -icanon
  11. >     if [ 2 -le $# ]; then
  12. >         eval "$2=\"\$(dd bs=1 count=1 2>/dev/null)\""
  13. >     else
  14. >         dd bs=1 count=1 2>/dev/null
  15. >     fi
  16. >     stty icanon
  17. > }
  18. >
  19. > doinstall() {
  20. 16c27,28
  21. <             read -p "$HOME/.osu exists, would you like to move it to $WINEPREFIX? (Will assume that the wineprefix is configured correctly) [Y/n] " yn
  22. ---
  23. >             readkey "$HOME/.osu exists, would you like to move it to $WINEPREFIX? (Will assume that the wineprefix is configured correctly) [Y/n] " yn
  24. >             echo
  25. 19c31
  26. <             rm -r "$WINEPREFIX" &>/dev/null
  27. ---
  28. >             rm -r "$WINEPREFIX" >/dev/null 2>&1
  29. 38c50
  30. <     if [ -z "$(which winetricks)" ]
  31. ---
  32. >     if [ -z "$(command -v winetricks)" ]
  33. 40,41c52,54
  34. <         echo "Installation failed. Please install winetricks."
  35. <         read
  36. ---
  37. >         stty -echo
  38. >         readkey "Installation failed. Please install winetricks." > /dev/null
  39. >         stty echo
  40. 56c69
  41. < function doinstalloptional {
  42. ---
  43. > doinstalloptional() {
  44. 68c81
  45. < function doremove {
  46. ---
  47. > doremove() {
  48. 118c131,141
  49. < vblank_mode=0 __GL_SYNC_TO_VBLANK=0 exec wine "$WINEPREFIX/drive_c/users/$USER/Local Settings/Application Data/osu!/osu!.exe" $@
  50. ---
  51. > # Bash-specific
  52. > args=()
  53. > for ((i=1; i<=$#; i++)); do
  54. >     if [ -e "${!i}" ]; then
  55. >         args[$i]="$(winepath -w "${!i}")"
  56. >     else
  57. >         args[$i]="${!i}"
  58. >     fi
  59. > done
  60. >
  61. > vblank_mode=0 __GL_SYNC_TO_VBLANK=0 exec wine "$WINEPREFIX/drive_c/users/$USER/Local Settings/Application Data/osu!/osu!.exe" "${args[@]}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement