public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* edksetup.sh: fix for non POSIX whereis(1)
@ 2022-11-21 13:09 tlaronde
  2022-11-21 22:22 ` [edk2-devel] " Pedro Falcato
  0 siblings, 1 reply; 8+ messages in thread
From: tlaronde @ 2022-11-21 13:09 UTC (permalink / raw)
  To: devel

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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-11-22 17:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-21 13:09 edksetup.sh: fix for non POSIX whereis(1) tlaronde
2022-11-21 22:22 ` [edk2-devel] " 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox