#!/bin/bash export WINEPREFIX="$HOME/.local/share/legion+/wineprefix" export WINEDEBUG=-all declare -a args for arg; do if [[ "${arg:0:1}" = "-" ]]; then args+=("${arg/#-//}") else args+=("$(winepath -w "$arg")") fi done wine $HOME/.local/share/legion+/LegionPlus.exe "${args[@]}" EXIT=$? if [[ $EXIT -ne 0 ]]; then echo "Error: Legion+ failed to launch!" echo -e "If Legion+ didn't start, you should try deleting your Legion+ Wine prefix and restart:" echo "rm -dr ~/.local/share/legion+/wineprefix" exit $EXIT fi