From 893acfffb2ebad6c99ff4dff80efe214f74eed60 Mon Sep 17 00:00:00 2001 From: tb14 Date: Fri, 4 Nov 2022 15:50:41 -0500 Subject: [PATCH] wine check if already installed --- AmRRON-Vara-setup.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/AmRRON-Vara-setup.sh b/AmRRON-Vara-setup.sh index 6569aa1..c9f105c 100755 --- a/AmRRON-Vara-setup.sh +++ b/AmRRON-Vara-setup.sh @@ -131,6 +131,22 @@ echo "${ERRCODE}" >> /tmp/vara_failures function install_vara_mint21() { +if hash wine 2>/dev/null; then + echo "Wine appears to already be installed. Click OK to continue to the next step" | yad \ +--text-info --image=$DIR/images/corps-icon.png --center --wrap \ +--button="No:0" --button="Install Wine:2" \ +--title "Wine Installation." \ +${r} ${c} +rc=$? +if [[ $rc -eq 2 ]]; then + echo "Wine already installed"; return +elif [[ $rc == 0 ]]; then + yad --image=$DIR/images/corps-icon.png --center --button="gtk-ok:0" --title "Exit Selected" --text "Exiting installer now" ${r} ${c} + exit 1 +fi + +else + echo "Wine needs to be installed in order to run VARA on Linux. Would you like me to attempt to do this now?" | yad \ --text-info --image=$DIR/images/corps-icon.png --center --wrap \ --button="No:0" --button="Install Wine:2" \