git: ef11261971a8 - main - emulators/wine: Simplify the logic in wine.sh

From: Gerald Pfeifer <gerald_at_FreeBSD.org>
Date: Wed, 31 Jan 2024 12:28:40 UTC
The branch main has been updated by gerald:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ef11261971a87d2b75b352ab479b651d2f2b0b50

commit ef11261971a87d2b75b352ab479b651d2f2b0b50
Author:     Gerald Pfeifer <gerald@FreeBSD.org>
AuthorDate: 2024-01-31 12:27:21 +0000
Commit:     Gerald Pfeifer <gerald@FreeBSD.org>
CommitDate: 2024-01-31 12:27:21 +0000

    emulators/wine: Simplify the logic in wine.sh
    
    PR:             275677
    Discussed with: Alex S <iwtcex@gmail.com>
---
 emulators/wine/files/wine.sh | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/emulators/wine/files/wine.sh b/emulators/wine/files/wine.sh
index 057406196371..ebd89e55ebdc 100644
--- a/emulators/wine/files/wine.sh
+++ b/emulators/wine/files/wine.sh
@@ -2,15 +2,11 @@
 
 TARGET="$(realpath "$0")"
 
-if [ -z "$WINESERVER" ]
-then
-  if [ -f "${TARGET%/*}/wineserver" ]
-  then
-    export WINESERVER="${TARGET%/*}/wineserver"
-  fi
-  if [ -f "${TARGET%/*}/wineserver32" ]
-  then
+if [ -z "$WINESERVER" ]; then
+  if [ -f "${TARGET%/*}/wineserver32" ]; then
     export WINESERVER="${TARGET%/*}/wineserver32"
+  elif [ -f "${TARGET%/*}/wineserver" ]; then
+    export WINESERVER="${TARGET%/*}/wineserver"
   fi
 fi