From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp26.services.sfr.fr (smtp26.services.sfr.fr [93.17.128.204]) by mx.groups.io with SMTP id smtpd.web11.37851.1669036190748735076 for ; Mon, 21 Nov 2022 05:09:51 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="no key for verify" header.i=@polynum.com header.s=202006 header.b=O47jHuBv; spf=pass (domain: sfr.fr, ip: 93.17.128.204, mailfrom: thierry.laronde@sfr.fr) X-mail-filterd: {"version":"1.5.3","queueID":"4NG75n0Y38z1LQLxh","contextId": "197900d2-16d8-4c45-88b7-71fec9216286"} Received: from cauchy.polynum.local (20.204.0.93.rev.sfr.net [93.0.204.20]) by msfrf2624.sfr.fr (SMTP Server) with ESMTP id 4NG75n0Y38z1LQLxh for ; Mon, 21 Nov 2022 14:09:49 +0100 (CET) X-mail-filterd: {"version":"1.5.3","queueID":"4NG75m6JkSz1LQLxd","contextId": "ead752af-b1a0-44ed-bfde-c05af7e853b2"} X-sfr-mailing: LEGIT X-sfr-spamrating: 40 X-sfr-spam: not-spam DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=polynum.com; s=202006; t=1669036189; h=Date:From:To:Subject; bh=AKf9Ik7oZBedgK7/7CqgZCKFDqI0+p0h39q9 IqQ9S2A=; b=O47jHuBvqTbCcv2nqB/x6fs0Gn6UFN+qRgDTBnYqL/hN7RHbvGyIe3bA5vJkjmB9 mMZ96pTddj0Jyq2kTU/yG7u36AJYdOqwF6WJOkX/eoxp0r8/sjFU78YAXQD6jwfz/eGmtWXVpjlK M8X3hOrfqI8z5J6LzAbUALHgotczyF9TF/Y8gC2zWIrEKcmhW+wFJOfE0tuj5Loxp92uXBp5f0pU cqnoJzrCtPXTfxtwAJnTYFSQSPz9XpZS0Jo7uXxkEOr3yzlaN69MomrbMWNkOTIDQK8IIhIQJZpy BSlx+/lsOaICE1mTow2j39QEQ9irSXmP316VjSkG0wxqUL+Snw== Received: from cauchy.polynum.local (20.204.0.93.rev.sfr.net [93.0.204.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: thierry.laronde@sfr.fr) by msfrf2624.sfr.fr (SMTP Server) with ESMTPSA id 4NG75m6JkSz1LQLxd for ; Mon, 21 Nov 2022 14:09:48 +0100 (CET) Authentication-Results: sfr.fr; auth=pass (LOGIN) smtp.auth=thierry.laronde@sfr.fr Received: from cauchy.polynum.local (localhost [127.0.0.1]) by cauchy.polynum.local (8.15.2/8.15.2) with ESMTP id 2ALD9l27001332 for ; Mon, 21 Nov 2022 14:09:47 +0100 (CET) Received: (from tlaronde@localhost) by cauchy.polynum.local (8.15.2/8.14.9/Submit) id 2ALD9lDq001540 for devel@edk2.groups.io; Mon, 21 Nov 2022 14:09:47 +0100 (CET) X-Authentication-Warning: cauchy.polynum.local: tlaronde set sender to thierry.laronde@sfr.fr using -f Date: Mon, 21 Nov 2022 14:09:47 +0100 From: tlaronde@polynum.com To: devel@edk2.groups.io Subject: edksetup.sh: fix for non POSIX whereis(1) Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 -- Thierry Laronde http://www.kergis.com/ http://kertex.kergis.com/ Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C