diff --git a/ynab4 b/ynab4 index 51a4d94..8511aa3 100644 --- a/ynab4 +++ b/ynab4 @@ -2,10 +2,13 @@ export WINEARCH=win64 WINEPREFIX="$HOME/.ynab4/wine" -if [ ! -d "$HOME"/.ynab4 ] ; then - mkdir -p "$HOME"/.ynab4/wine || exit 1 +ynab_wine="${HOME}/.ynab4/wine" +mkdir -p "${ynab_wine}" || exit 1 + +ynab_path="${ynab_wine}/drive_c/Program Files (x86)/YNAB 4/YNAB 4.exe' +if [ ! -f "$ynab_path" ] ; then wine /usr/share/ynab4/Setup.exe || exit 1 winetricks corefonts || exit 1 fi -wine "$HOME"/.ynab4/wine/drive_c/Program\ Files\ \(x86\)/YNAB\ 4/YNAB\ 4.exe +wine "$ynab_path"