Skip to content

Commit

Permalink
Make shebangs more portable
Browse files Browse the repository at this point in the history
The `/bin/bash` binary/symlink is not available on all systems.

The new shebang works if `/usr/bin/env` exists and `bash` is in the path
which should be the case for most reasonably modern systems.
  • Loading branch information
sveitser committed Aug 17, 2023
1 parent a4aaafc commit 0e9101f
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion op-bindings/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SHELL := /bin/bash
SHELL := /usr/bin/env bash

pkg := bindings
monorepo-base := $(shell dirname $(realpath .))
Expand Down
2 changes: 1 addition & 1 deletion op-chain-ops/crossdomain/testdata/trace.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

HASH=$1

Expand Down
2 changes: 1 addition & 1 deletion op-challenger/scripts/alphabet/charlie.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -euo pipefail

SOURCE_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
Expand Down
2 changes: 1 addition & 1 deletion op-challenger/scripts/alphabet/init_game.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -euo pipefail

Expand Down
2 changes: 1 addition & 1 deletion op-challenger/scripts/alphabet/mallory.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -euo pipefail

SOURCE_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
Expand Down
2 changes: 1 addition & 1 deletion op-challenger/scripts/parallel.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# set -x

Expand Down
2 changes: 1 addition & 1 deletion op-challenger/scripts/visualize.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -euo pipefail

Expand Down
2 changes: 1 addition & 1 deletion packages/contracts-bedrock/scripts/slither.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

rm -rf artifacts forge-artifacts

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

if ! command -v forge &> /dev/null
then
Expand Down

0 comments on commit 0e9101f

Please sign in to comment.