Created
July 8, 2015 14:27
-
-
Save alfonsojon/cacaf406004996b4fb5e to your computer and use it in GitHub Desktop.
rwine function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Assume that spawndialog is a working function | |
# | |
rwine () { | |
printf '%b\n' "> rwine: calling wine with arguments \"$(printf "%s " "$@")\"" | |
if [[ "$1" = "--silent" ]]; then | |
$WINE "${@:2}" && rwineserver --wait | |
else | |
$WINE "$@" && rwineserver --wait; [[ "$?" = "0" ]] || { | |
spawndialog error "wine closed unsuccessfully.\nSee terminal for details. (exit code $?)" | |
exit $? | |
} | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment