public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: tlaronde@polynum.com
To: devel@edk2.groups.io
Subject: edksetup.sh: fix for non POSIX whereis(1)
Date: Mon, 21 Nov 2022 14:09:47 +0100	[thread overview]
Message-ID: <Y3t4mxrmhuiMG/nN@polynum.com> (raw)

diff --git a/edksetup.sh b/edksetup.sh
index 06d2f041e6..46b295c430 100755
--- a/edksetup.sh
+++ b/edksetup.sh
@@ -105,6 +105,19 @@ function SetupEnv()
   fi
 }
 
+# whereis(1) is not a POSIX utility and, for example, its implementation
+# in NetBSD is different form the Linux one.
+#
+function whereis()
+{
+  (
+    IFS=:
+    for dir in $PATH; do
+      eval ls $dir/${1}* 2>/dev/null || true 
+    done
+  )
+}
+
 function SetupPython3()
 {
   if [ $origin_version ];then

signed-off-by: Thierry LARONDE <tlaronde@polynum.com>
-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                     http://www.kergis.com/
                    http://kertex.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C

             reply	other threads:[~2022-11-21 13:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 13:09 tlaronde [this message]
2022-11-21 22:22 ` [edk2-devel] edksetup.sh: fix for non POSIX whereis(1) Pedro Falcato
2022-11-22  8:14   ` tlaronde
2022-11-22 15:40   ` Rebecca Cran
2022-11-22 16:22     ` Pedro Falcato
2022-11-22 16:26     ` tlaronde
2022-11-22 16:31       ` Pedro Falcato
2022-11-22 17:07         ` tlaronde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y3t4mxrmhuiMG/nN@polynum.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox