diff --git a/contrib/fresh_clone_compile_and_run.sh b/contrib/fresh_clone_compile_and_run.sh index 9f92a0ca6..4e481822f 100644 --- a/contrib/fresh_clone_compile_and_run.sh +++ b/contrib/fresh_clone_compile_and_run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index 317bd8694..da8be060b 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -53,7 +53,7 @@ script: | function create_global_faketime_wrappers { for prog in ${FAKETIME_PROGS}; do - echo '#!/bin/bash' > ${WRAP_DIR}/${prog} + echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog} echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog} echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog} echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog} @@ -65,7 +65,7 @@ script: | function create_per-host_faketime_wrappers { for i in $HOSTS; do for prog in ${FAKETIME_HOST_PROGS}; do - echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog} + echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog} echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog} echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog} echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog} diff --git a/contrib/gitian-descriptors/gitian-osx-signer.yml b/contrib/gitian-descriptors/gitian-osx-signer.yml index b00eb2fb9..73a2f12f3 100644 --- a/contrib/gitian-descriptors/gitian-osx-signer.yml +++ b/contrib/gitian-descriptors/gitian-osx-signer.yml @@ -20,7 +20,7 @@ script: | # Create global faketime wrappers for prog in ${FAKETIME_PROGS}; do - echo '#!/bin/bash' > ${WRAP_DIR}/${prog} + echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog} echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog} echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog} echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog} diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml index 794a82af8..4d5a8736f 100644 --- a/contrib/gitian-descriptors/gitian-osx.yml +++ b/contrib/gitian-descriptors/gitian-osx.yml @@ -48,7 +48,7 @@ script: | function create_global_faketime_wrappers { for prog in ${FAKETIME_PROGS}; do - echo '#!/bin/bash' > ${WRAP_DIR}/${prog} + echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog} echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog} echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog} echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog} @@ -60,7 +60,7 @@ script: | function create_per-host_faketime_wrappers { for i in $HOSTS; do for prog in ${FAKETIME_HOST_PROGS}; do - echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog} + echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog} echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog} echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog} echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog} diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml index 44fc4e356..cab6187fa 100644 --- a/contrib/gitian-descriptors/gitian-win.yml +++ b/contrib/gitian-descriptors/gitian-win.yml @@ -47,7 +47,7 @@ script: | function create_global_faketime_wrappers { for prog in ${FAKETIME_PROGS}; do - echo '#!/bin/bash' > ${WRAP_DIR}/${prog} + echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${prog} echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog} echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog} echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${prog} @@ -59,7 +59,7 @@ script: | function create_per-host_faketime_wrappers { for i in $HOSTS; do for prog in ${FAKETIME_HOST_PROGS}; do - echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog} + echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog} echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog} echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog} echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog} @@ -75,14 +75,14 @@ script: | for i in $HOSTS; do mkdir -p ${WRAP_DIR}/${i} for prog in collect2; do - echo '#!/bin/bash' > ${WRAP_DIR}/${i}/${prog} + echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}/${prog} REAL=$(${i}-gcc -print-prog-name=${prog}) echo "export MALLOC_PERTURB_=255" >> ${WRAP_DIR}/${i}/${prog} echo "${REAL} \$@" >> $WRAP_DIR/${i}/${prog} chmod +x ${WRAP_DIR}/${i}/${prog} done for prog in gcc g++; do - echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog} + echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog} echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog} echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog} echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog} diff --git a/contrib/init/hushd.init b/contrib/init/hushd.init index 225a5ea2a..370aaf101 100644 --- a/contrib/init/hushd.init +++ b/contrib/init/hushd.init @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # hushd The hush core server. # diff --git a/contrib/snapshot/airdrop_hush3.sh b/contrib/snapshot/airdrop_hush3.sh index 87a68369c..c3ee8b700 100755 --- a/contrib/snapshot/airdrop_hush3.sh +++ b/contrib/snapshot/airdrop_hush3.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This code inspired by and dedicated to Decker echo "Airdropping funds to HUSH3, hold onto your butts..." diff --git a/contrib/snapshot/testnet_airdrop_hush3.sh b/contrib/snapshot/testnet_airdrop_hush3.sh index fd20926d4..33dee5a1a 100755 --- a/contrib/snapshot/testnet_airdrop_hush3.sh +++ b/contrib/snapshot/testnet_airdrop_hush3.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This code inspired by and dedicated to Decker echo "Airdropping funds to HUSH3, hold onto your butts..." diff --git a/contrib/tidy_datadir.sh b/contrib/tidy_datadir.sh index 6e5300394..7cc5b3834 100755 --- a/contrib/tidy_datadir.sh +++ b/contrib/tidy_datadir.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2018-2020 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/contrib/verify-commits/pre-push-hook.sh b/contrib/verify-commits/pre-push-hook.sh index c572517e9..1c98dc9a8 100755 --- a/contrib/verify-commits/pre-push-hook.sh +++ b/contrib/verify-commits/pre-push-hook.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/contrib/verify-commits/verify-commits.sh b/contrib/verify-commits/verify-commits.sh index 74216fbd2..275e6cb00 100755 --- a/contrib/verify-commits/verify-commits.sh +++ b/contrib/verify-commits/verify-commits.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/contrib/verifysfbinaries/verify.sh b/contrib/verifysfbinaries/verify.sh index 3eb469388..67af138cb 100755 --- a/contrib/verifysfbinaries/verify.sh +++ b/contrib/verifysfbinaries/verify.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ### This script attempts to download the signature file SHA256SUMS.asc from bitcoin.org ### It first checks if the signature passes, and then downloads the files specified in diff --git a/migratecoin.sh b/migratecoin.sh index f34215197..a32d30a5f 100644 --- a/migratecoin.sh +++ b/migratecoin.sh @@ -1,4 +1,4 @@ -#!/usr/bin/bash +#!/usr/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/qa/hush/checksec.sh b/qa/hush/checksec.sh index dd1f72e54..2a4897030 100755 --- a/qa/hush/checksec.sh +++ b/qa/hush/checksec.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # The BSD License (http://www.opensource.org/licenses/bsd-license.php) # specifies the terms and conditions of use for checksec.sh: diff --git a/qa/pull-tester/cc-tests.sh b/qa/pull-tester/cc-tests.sh index d68671e12..bfce8ff74 100755 --- a/qa/pull-tester/cc-tests.sh +++ b/qa/pull-tester/cc-tests.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e -o pipefail CURDIR=$(cd $(dirname "$0"); pwd) diff --git a/qa/pull-tester/rpc-tests.sh b/qa/pull-tester/rpc-tests.sh index 3bafe170c..07e123b6f 100755 --- a/qa/pull-tester/rpc-tests.sh +++ b/qa/pull-tester/rpc-tests.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers # Released under the GPLv3 diff --git a/qa/pull-tester/run-bitcoin-cli b/qa/pull-tester/run-bitcoin-cli index 2e7b326af..c7f09ce8a 100755 --- a/qa/pull-tester/run-bitcoin-cli +++ b/qa/pull-tester/run-bitcoin-cli @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers # Released under the GPLv3 diff --git a/qa/pull-tester/run-bitcoind-for-test.sh.in b/qa/pull-tester/run-bitcoind-for-test.sh.in index 4527dff7b..40b6683ad 100755 --- a/qa/pull-tester/run-bitcoind-for-test.sh.in +++ b/qa/pull-tester/run-bitcoind-for-test.sh.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # THIS FILE IS GENERATED FROM run-bitcoind-for-test.sh.in # Copyright (c) 2013-2014 The Bitcoin Core developers # Copyright (c) 2016-2022 The Hush developers diff --git a/qa/pull-tester/tests-config.sh.in b/qa/pull-tester/tests-config.sh.in index 824b9d2a1..6718ffbc1 100755 --- a/qa/pull-tester/tests-config.sh.in +++ b/qa/pull-tester/tests-config.sh.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # THIS FILE IS GENERATED FROM tests-config.sh.in # Copyright (c) 2013-2014 The Bitcoin Core developers # Copyright (c) 2016-2022 The Hush developers diff --git a/src/assetchains_stop b/src/assetchains_stop index e5ccc0fcb..e20e4f89a 100755 --- a/src/assetchains_stop +++ b/src/assetchains_stop @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers set -eo pipefail hush_cli='./hush-cli' diff --git a/src/cc/makecclib b/src/cc/makecclib index c115cd0c1..dc389ecaf 100755 --- a/src/cc/makecclib +++ b/src/cc/makecclib @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/src/purge b/src/purge index d34b6f72b..6b037f221 100755 --- a/src/purge +++ b/src/purge @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers # Released under the GPLv3 diff --git a/src/sc/hush b/src/sc/hush index 9ac3edcd4..53fd07fe0 100755 --- a/src/sc/hush +++ b/src/sc/hush @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2018-2020 The Hush developers #set working directory to the location of this script DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" diff --git a/src/sc/koolaid b/src/sc/koolaid index 5c3543ecf..3d9835cb7 100755 --- a/src/sc/koolaid +++ b/src/sc/koolaid @@ -1,3 +1,3 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2018-2020 The Hush developers ./hush-smart-chain -ac_name=KOOLAID $@ diff --git a/src/sc/kush b/src/sc/kush index b39a0d5fd..716848019 100755 --- a/src/sc/kush +++ b/src/sc/kush @@ -1,3 +1,3 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2018-2020 The Hush developers ./hush-smart-chain -ac_name=KUSH $@ diff --git a/src/sc/zex b/src/sc/zex index 2c95cf1a9..56b2975af 100755 --- a/src/sc/zex +++ b/src/sc/zex @@ -1,3 +1,3 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2018-2020 The Hush developers ./hush-smart-chain -ac_name=ZEX $@ diff --git a/src/smartchains b/src/smartchains index 68a340bb9..d457637fe 100755 --- a/src/smartchains +++ b/src/smartchains @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2018-2022 The Hush developers set -eo pipefail diff --git a/src/smartchains.old b/src/smartchains.old index 3a369677f..8a5aff049 100755 --- a/src/smartchains.old +++ b/src/smartchains.old @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2018-2020 The Hush developers set -x delay=60 diff --git a/src/tush-cli b/src/tush-cli index d2442d3fb..248094b68 100755 --- a/src/tush-cli +++ b/src/tush-cli @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers # set working directory to the location of this script diff --git a/src/zush b/src/zush index d464315e5..d9bb30f4f 100755 --- a/src/zush +++ b/src/zush @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers # set working directory to the location of this script diff --git a/test_randomx b/test_randomx index df45890d8..bc41bb85c 100755 --- a/test_randomx +++ b/test_randomx @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # any CLI args given to this script will be passed along # example: ./test_randomx -debug=randomx diff --git a/toolchain-info.sh b/toolchain-info.sh index c475653a4..68445ca40 100755 --- a/toolchain-info.sh +++ b/toolchain-info.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/util/build-arm.sh b/util/build-arm.sh index 36204427c..f22ed7acf 100755 --- a/util/build-arm.sh +++ b/util/build-arm.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2019-2020 radix42 # Copyright (c) 2016-2022 The Hush developers # Original aarch64 port by radix42. Thank you! diff --git a/util/build-debian-package.sh b/util/build-debian-package.sh index ad88ac90f..745273231 100755 --- a/util/build-debian-package.sh +++ b/util/build-debian-package.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/util/build-mac.sh b/util/build-mac.sh index cb475cd41..c86b6cef4 100755 --- a/util/build-mac.sh +++ b/util/build-mac.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/util/build-win.sh b/util/build-win.sh index a5b865046..8fdcee6d7 100755 --- a/util/build-win.sh +++ b/util/build-win.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/util/docker-entrypoint.sh b/util/docker-entrypoint.sh index 38e0bcfb9..0607b1f25 100755 --- a/util/docker-entrypoint.sh +++ b/util/docker-entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers # Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html diff --git a/util/docker-hush-cli.sh b/util/docker-hush-cli.sh index 9c2c11cee..edd8f7e7d 100755 --- a/util/docker-hush-cli.sh +++ b/util/docker-hush-cli.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2019-2020 Hush developers /hush/src/hush-cli $@ diff --git a/util/gen-linux-binary-release.sh b/util/gen-linux-binary-release.sh index cd4cec2b7..d3df4b618 100755 --- a/util/gen-linux-binary-release.sh +++ b/util/gen-linux-binary-release.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2016-2022 The Hush developers # Released under the GPLv3