Skip to content

Commit 0f3038a

Browse files
author
B. Wilson
committed
make3: Switch to env-style shebang
Much ink has been spilled over the "correct" shebang. Here, opting for env-style is making a declaration of *intent*: These scripts prioritize environment flexiblity over execution precision. In particular, using a `#!/bin/sh` shebang declares that this script shall be run by the interpreter sitting at the absolute path `/bin/sh`. This style of shebang is useful when needing precise control over the executing interpreter. However, the use case for these scripts means that we have little a priori control over the executing interpreter, and there are legitimate cases where users may wish to use some other shell in preference to `/bin/sh`, e.g. containerized environments. The `#!/usr/bin/env sh` shebang caters to these needs. Of course, there are some cases (quite rare, now) where the env-shebang in this commit will fail [0]; however, we make the decision to de-prioritize these cases over the aforementioned ones. [0]:https://www.in-ulm.de/~mascheck/various/shebang/#env
1 parent 5cdde63 commit 0f3038a

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

make3/build_all.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env sh
22
# build all binaries
33

44
realpath()

make3/build_jconsole.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env sh
22

33
realpath()
44
{

make3/build_jnative.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env sh
22

33
realpath()
44
{

make3/build_libj.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env sh
22

33
realpath()
44
{

make3/build_tsdll.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env sh
22

33
realpath()
44
{

make3/clean.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env sh
22
# rm all *.o for clean builds - makefile dependencies are not set
33

44
realpath()

make3/cpbin.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env sh
22

33
# copy binaries in bin/ to jlibrary/bin
44

0 commit comments

Comments
 (0)