From 84b547c28ddb6581ec3cca69294fcdada3dc3027 Mon Sep 17 00:00:00 2001 From: Sergey Timoshin Date: Mon, 14 Oct 2024 08:49:31 +0100 Subject: [PATCH] chore: update shebang to use bash instead of sh in every script (#1296) --- scripts/clean.sh | 2 +- scripts/coverage.sh | 2 +- scripts/format.sh | 2 +- scripts/lint.sh | 2 +- scripts/push-compressed-token-idl.sh | 3 ++- scripts/push-stateless-js-idls.sh | 3 ++- scripts/release-all-rust-crates.sh | 2 +- scripts/test.sh | 2 +- scripts/tsc-create-r1cs.sh | 2 +- 9 files changed, 11 insertions(+), 9 deletions(-) diff --git a/scripts/clean.sh b/scripts/clean.sh index 4251db0b43..75b4e6de44 100755 --- a/scripts/clean.sh +++ b/scripts/clean.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash find . -type d -name "test-ledger" -exec sh -c 'echo "Deleting {}"; rm -rf "{}"' \; diff --git a/scripts/coverage.sh b/scripts/coverage.sh index 37649e68a1..20487973b1 100755 --- a/scripts/coverage.sh +++ b/scripts/coverage.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash . "./scripts/devenv.sh" || { echo >&2 "Failed to source devenv.sh. Aborting."; exit 1; } diff --git a/scripts/format.sh b/scripts/format.sh index c77965da83..a28dc3e452 100755 --- a/scripts/format.sh +++ b/scripts/format.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash set -e diff --git a/scripts/lint.sh b/scripts/lint.sh index 10a00479a6..c9b5a9e970 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash set -e npx nx run-many --target=format:check --all diff --git a/scripts/push-compressed-token-idl.sh b/scripts/push-compressed-token-idl.sh index 97a931784d..82e930cac7 100755 --- a/scripts/push-compressed-token-idl.sh +++ b/scripts/push-compressed-token-idl.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#!/usr/bin/env bash + cd "$(git rev-parse --show-toplevel)" PDA_FILE="target/idl/light_system_program.json" diff --git a/scripts/push-stateless-js-idls.sh b/scripts/push-stateless-js-idls.sh index aed56190ea..8b6cb202bb 100755 --- a/scripts/push-stateless-js-idls.sh +++ b/scripts/push-stateless-js-idls.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#!/usr/bin/env bash + cd "$(git rev-parse --show-toplevel)" SOURCE_DIR="./target/types" diff --git a/scripts/release-all-rust-crates.sh b/scripts/release-all-rust-crates.sh index 93d35372e1..67a4ab4554 100755 --- a/scripts/release-all-rust-crates.sh +++ b/scripts/release-all-rust-crates.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Configuration CRATES_IO_TOKEN=${CRATES_IO_TOKEN} diff --git a/scripts/test.sh b/scripts/test.sh index 1450ff9577..a9dc4c26b1 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash . "./scripts/devenv.sh" || { echo >&2 "Failed to source devenv.sh. Aborting."; exit 1; } diff --git a/scripts/tsc-create-r1cs.sh b/scripts/tsc-create-r1cs.sh index 2a02f39347..b6d488b3cc 100755 --- a/scripts/tsc-create-r1cs.sh +++ b/scripts/tsc-create-r1cs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Ensure we're working from the root directory of the monorepo SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"