From cead232c46a155cd1ea0a220f14e276922bde901 Mon Sep 17 00:00:00 2001 From: William Hua Date: Wed, 3 Jul 2024 12:08:05 -0400 Subject: [PATCH] use more portable script interpreter shebang Bash doesn't always exist at /bin/bash on some distros like NixOS. --- lib/foundry-huff/scripts/binary_check.sh | 2 +- lib/foundry-huff/scripts/file_writer.sh | 2 +- lib/foundry-huff/scripts/rand_bytes.sh | 4 ++-- lib/foundry-huff/scripts/read_and_append.sh | 2 +- scripts/binary_check.sh | 2 +- scripts/file_writer.sh | 2 +- scripts/rand_bytes.sh | 4 ++-- scripts/read_and_append.sh | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/foundry-huff/scripts/binary_check.sh b/lib/foundry-huff/scripts/binary_check.sh index 725a058..bc2625a 100755 --- a/lib/foundry-huff/scripts/binary_check.sh +++ b/lib/foundry-huff/scripts/binary_check.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash if ! [[ "$(npm list -g huffc)" =~ "empty" ]]; then # huffc was installed via npm, return 0x00 diff --git a/lib/foundry-huff/scripts/file_writer.sh b/lib/foundry-huff/scripts/file_writer.sh index 93e3a8d..0237975 100755 --- a/lib/foundry-huff/scripts/file_writer.sh +++ b/lib/foundry-huff/scripts/file_writer.sh @@ -1,3 +1,3 @@ -#! /bin/bash +#! /usr/bin/env bash echo "$2" > $1 diff --git a/lib/foundry-huff/scripts/rand_bytes.sh b/lib/foundry-huff/scripts/rand_bytes.sh index fdd9921..6899817 100755 --- a/lib/foundry-huff/scripts/rand_bytes.sh +++ b/lib/foundry-huff/scripts/rand_bytes.sh @@ -1,3 +1,3 @@ -#! /bin/bash +#! /usr/bin/env bash -echo -n $(hexdump -n 16 -v -e '"0x" 32/1 "%02x" "\n"' /dev/urandom) \ No newline at end of file +echo -n $(hexdump -n 16 -v -e '"0x" 32/1 "%02x" "\n"' /dev/urandom) diff --git a/lib/foundry-huff/scripts/read_and_append.sh b/lib/foundry-huff/scripts/read_and_append.sh index a143365..d2fc64c 100755 --- a/lib/foundry-huff/scripts/read_and_append.sh +++ b/lib/foundry-huff/scripts/read_and_append.sh @@ -1,3 +1,3 @@ -#! /bin/bash +#! /usr/bin/env bash cat $2 >> $1 diff --git a/scripts/binary_check.sh b/scripts/binary_check.sh index 51e5921..7b8fad8 100755 --- a/scripts/binary_check.sh +++ b/scripts/binary_check.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash # Check if npm is installed if command -v npm &> /dev/null; then diff --git a/scripts/file_writer.sh b/scripts/file_writer.sh index 93e3a8d..0237975 100755 --- a/scripts/file_writer.sh +++ b/scripts/file_writer.sh @@ -1,3 +1,3 @@ -#! /bin/bash +#! /usr/bin/env bash echo "$2" > $1 diff --git a/scripts/rand_bytes.sh b/scripts/rand_bytes.sh index fdd9921..6899817 100755 --- a/scripts/rand_bytes.sh +++ b/scripts/rand_bytes.sh @@ -1,3 +1,3 @@ -#! /bin/bash +#! /usr/bin/env bash -echo -n $(hexdump -n 16 -v -e '"0x" 32/1 "%02x" "\n"' /dev/urandom) \ No newline at end of file +echo -n $(hexdump -n 16 -v -e '"0x" 32/1 "%02x" "\n"' /dev/urandom) diff --git a/scripts/read_and_append.sh b/scripts/read_and_append.sh index a143365..d2fc64c 100755 --- a/scripts/read_and_append.sh +++ b/scripts/read_and_append.sh @@ -1,3 +1,3 @@ -#! /bin/bash +#! /usr/bin/env bash cat $2 >> $1