Skip to content

Commit

Permalink
fix: Adjust shebang to point to /usr/bin/env bash (#251)
Browse files Browse the repository at this point in the history
It's recommended to point the shebang for bash scripts to `/usr/bin/env bash` instead of `/bin/bash` to account for systems that may have a non-standard binary layout, like, e.g., NixOS.
This patch adjust the install scripts to properly handle these cases.
  • Loading branch information
Chaostheorie committed Jul 7, 2023
1 parent 3dd4ec5 commit 539cf09
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion scripts/benchmark.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#!/bin/bash
#!/usr/bin/env bash

# Compile the benchmark
mvn test-compile
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion scripts/download_linux_jdk.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Download a copy of linux JDK in jdks/linux

set -e
Expand Down
2 changes: 1 addition & 1 deletion scripts/download_mac_jdk.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Download a copy of mac JDK in jdks/mac

set -e
Expand Down
2 changes: 1 addition & 1 deletion scripts/download_windows_jdk.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Download a copy of windows JDK in jdks/windows

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

# Grab root directory to help with creating an absolute path for changed files.
root_dir="$(git rev-parse --show-toplevel)"
Expand Down
2 changes: 1 addition & 1 deletion scripts/gen_proto.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
protoc -I=src/main/protobuf --java_out=src/main/java src/main/protobuf/build.proto
protoc -I=src/main/protobuf --java_out=src/main/java src/main/protobuf/analysis.proto
protoc -I=src/main/protobuf --java_out=src/main/java src/main/protobuf/analysis_v2.proto
2 changes: 1 addition & 1 deletion scripts/link_linux.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Create self-contained copy of java in dist/linux

set -e
Expand Down
2 changes: 1 addition & 1 deletion scripts/link_mac.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Create self-contained copy of java in dist/mac

set -e
Expand Down
2 changes: 1 addition & 1 deletion scripts/link_windows.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Create self-contained copy of java in dist/windows

set -e
Expand Down

0 comments on commit 539cf09

Please sign in to comment.