Skip to contentSkip to conversation

scripts: use env to invoke bash

PATCH Superseded Himanshu Chauhan 2 participants 2 messages Dec 8, 2022

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts: use env to invoke bash

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

---
 scripts/carray.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/carray.sh +1 -1
index 0c52bd6..13f9d36 100755
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 function usage()
 {
Signature · 1 line
2.38.1
#1 lore raw

PATCH 1/1 scripts: use env to invoke bash

? 2022-12-08???? 19:08 +0530?Himanshu Chauhan???

Quoted 7 lines

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

scripts/d2c.sh and scripts/create-binary-archive.sh also need the same modification.

Regards,
Xiang W

Quoted 18 lines

---
?scripts/carray.sh | 2 +-
?1 file changed, 1 insertion(+), 1 deletion(-)

scripts/carray.sh +1 -1
index 0c52bd6..13f9d36 100755
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash

?
?function usage()
?{

Signature · 1 line
2.38.1