Skip to content

Instantly share code, notes, and snippets.

@alfonsojon
Created July 8, 2015 14:27
Show Gist options
  • Save alfonsojon/cacaf406004996b4fb5e to your computer and use it in GitHub Desktop.
Save alfonsojon/cacaf406004996b4fb5e to your computer and use it in GitHub Desktop.
rwine function
#
# 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