diff mbox series

scripts: use env to invoke bash

Message ID 20221208133820.1082271-1-hchauhan@ventanamicro.com
State Superseded
Headers show
Series scripts: use env to invoke bash | expand

Commit Message

Himanshu Chauhan Dec. 8, 2022, 1:38 p.m. UTC
Not all systems have bash at a fixed location like /bin/bash.
FreeBSD, for example, would typically have it at /usr/local/bin/bash.
When building OpenSBI on freebsd system, the build breaks.

Its advisable to use: #!/usr/bin/env bash

Signed-off-by: Himanshu Chauhan <hchauhan@ventanamicro.com>
---
 scripts/carray.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Xiang W Dec. 8, 2022, 3:20 p.m. UTC | #1
在 2022-12-08星期四的 19:08 +0530,Himanshu Chauhan写道:
> Not all systems have bash at a fixed location like /bin/bash.
> FreeBSD, for example, would typically have it at /usr/local/bin/bash.
> When building OpenSBI on freebsd system, the build breaks.
> 
> Its advisable to use: #!/usr/bin/env bash
> 
> Signed-off-by: Himanshu Chauhan <hchauhan@ventanamicro.com>
scripts/d2c.sh and scripts/create-binary-archive.sh also need the
same modification.

Regards,
Xiang W
> ---
>  scripts/carray.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/carray.sh b/scripts/carray.sh
> index 0c52bd6..13f9d36 100755
> --- a/scripts/carray.sh
> +++ b/scripts/carray.sh
> @@ -1,4 +1,4 @@
> -#!/bin/bash
> +#!/usr/bin/env bash
>  
>  function usage()
>  {
> -- 
> 2.38.1
> 
>
diff mbox series

Patch

diff --git a/scripts/carray.sh b/scripts/carray.sh
index 0c52bd6..13f9d36 100755
--- a/scripts/carray.sh
+++ b/scripts/carray.sh
@@ -1,4 +1,4 @@ 
-#!/bin/bash
+#!/usr/bin/env bash
 
 function usage()
 {