Browse Source

codemod --extensions sh '#!/bin/bash' '#!/usr/bin/env bash'

Michael Vines 7 years ago
parent
commit
33aab094ef
65 changed files with 66 additions and 66 deletions
  1. 1 1
      ci/audit.sh
  2. 1 1
      ci/channel-info.sh
  3. 1 1
      ci/crate-version.sh
  4. 1 1
      ci/docker-run.sh
  5. 1 1
      ci/docker-rust-nightly/build.sh
  6. 1 1
      ci/docker-rust/build.sh
  7. 1 1
      ci/docker-snapcraft/build.sh
  8. 1 1
      ci/docker-solana/build.sh
  9. 1 1
      ci/docker-solana/entrypoint.sh
  10. 1 1
      ci/hoover.sh
  11. 1 1
      ci/is-pr.sh
  12. 1 1
      ci/localnet-sanity.sh
  13. 1 1
      ci/pr-snap.sh
  14. 1 1
      ci/publish-book.sh
  15. 1 1
      ci/publish-bpf-sdk.sh
  16. 1 1
      ci/publish-crate.sh
  17. 1 1
      ci/publish-solana-tar.sh
  18. 1 1
      ci/run-local.sh
  19. 1 1
      ci/shellcheck.sh
  20. 1 1
      ci/snap.sh
  21. 1 1
      ci/test-bench.sh
  22. 1 1
      ci/test-large-network.sh
  23. 1 1
      ci/test-nightly.sh
  24. 1 1
      ci/test-stable-perf.sh
  25. 1 1
      ci/test-stable.sh
  26. 1 1
      ci/testnet-automation-cleanup.sh
  27. 1 1
      ci/testnet-automation.sh
  28. 1 1
      ci/testnet-deploy.sh
  29. 1 1
      ci/testnet-manager.sh
  30. 1 1
      ci/testnet-sanity.sh
  31. 1 1
      ci/version-check.sh
  32. 1 1
      fetch-perf-libs.sh
  33. 1 1
      multinode-demo/client.sh
  34. 1 1
      multinode-demo/drone.sh
  35. 1 1
      multinode-demo/leader.sh
  36. 1 1
      multinode-demo/setup.sh
  37. 1 1
      multinode-demo/validator-x.sh
  38. 1 1
      multinode-demo/validator.sh
  39. 2 2
      net/gce.sh
  40. 1 1
      net/init-metrics.sh
  41. 1 1
      net/net.sh
  42. 1 1
      net/remote/remote-client.sh
  43. 1 1
      net/remote/remote-node.sh
  44. 1 1
      net/remote/remote-sanity.sh
  45. 1 1
      net/scripts/add-solana-user-authorized_keys.sh
  46. 1 1
      net/scripts/create-solana-user.sh
  47. 1 1
      net/scripts/disable-background-upgrades.sh
  48. 1 1
      net/scripts/install-docker.sh
  49. 1 1
      net/scripts/install-earlyoom.sh
  50. 1 1
      net/scripts/install-libssl-compatability.sh
  51. 1 1
      net/scripts/install-rsync.sh
  52. 1 1
      net/scripts/network-config.sh
  53. 1 1
      net/scripts/remove-docker-interface.sh
  54. 1 1
      net/scripts/rsync-retry.sh
  55. 1 1
      net/scripts/update-default-cuda.sh
  56. 1 1
      net/ssh.sh
  57. 1 1
      programs/bpf/rust/noop/build.sh
  58. 1 1
      scripts/increment-cargo-version.sh
  59. 1 1
      scripts/install-native-programs.sh
  60. 1 1
      scripts/metrics-write-datapoint.sh
  61. 1 1
      scripts/net-stats.sh
  62. 1 1
      scripts/oom-monitor.sh
  63. 1 1
      scripts/snap-config-to-env.sh
  64. 1 1
      scripts/wallet-help.sh
  65. 1 1
      scripts/wallet-sanity.sh

+ 1 - 1
ci/audit.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 #
 #
 # Audits project dependencies for security vulnerabilities
 # Audits project dependencies for security vulnerabilities
 #
 #

+ 1 - 1
ci/channel-info.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 #
 # Computes the current branch names of the edge, beta and stable
 # Computes the current branch names of the edge, beta and stable
 # channels, as well as the latest tagged release for beta and stable.
 # channels, as well as the latest tagged release for beta and stable.

+ 1 - 1
ci/crate-version.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 #
 #
 # Outputs the current crate version
 # Outputs the current crate version
 #
 #

+ 1 - 1
ci/docker-run.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 usage() {
 usage() {
   echo "Usage: $0 [--nopull] [docker image name] [command]"
   echo "Usage: $0 [--nopull] [docker image name] [command]"

+ 1 - 1
ci/docker-rust-nightly/build.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -ex
+#!/usr/bin/env bash -ex
 
 
 cd "$(dirname "$0")"
 cd "$(dirname "$0")"
 
 

+ 1 - 1
ci/docker-rust/build.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -ex
+#!/usr/bin/env bash -ex
 
 
 cd "$(dirname "$0")"
 cd "$(dirname "$0")"
 
 

+ 1 - 1
ci/docker-snapcraft/build.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -ex
+#!/usr/bin/env bash -ex
 
 
 cd "$(dirname "$0")"
 cd "$(dirname "$0")"
 
 

+ 1 - 1
ci/docker-solana/build.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -ex
+#!/usr/bin/env bash -ex
 
 
 cd "$(dirname "$0")"
 cd "$(dirname "$0")"
 eval "$(../channel-info.sh)"
 eval "$(../channel-info.sh)"

+ 1 - 1
ci/docker-solana/entrypoint.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -ex
+#!/usr/bin/env bash -ex
 
 
 export RUST_LOG=${RUST_LOG:-solana=info} # if RUST_LOG is unset, default to info
 export RUST_LOG=${RUST_LOG:-solana=info} # if RUST_LOG is unset, default to info
 export RUST_BACKTRACE=1
 export RUST_BACKTRACE=1

+ 1 - 1
ci/hoover.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 #
 # Regular maintenance performed on a buildkite agent to control disk usage
 # Regular maintenance performed on a buildkite agent to control disk usage
 #
 #

+ 1 - 1
ci/is-pr.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 #
 #
 # The standard BUILDKITE_PULL_REQUEST environment variable is always "false" due
 # The standard BUILDKITE_PULL_REQUEST environment variable is always "false" due
 # to how solana-ci-gate is used to trigger PR builds rather than using the
 # to how solana-ci-gate is used to trigger PR builds rather than using the

+ 1 - 1
ci/localnet-sanity.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 #
 #
 # Perform a quick sanity test on a leader, drone, validator and client running
 # Perform a quick sanity test on a leader, drone, validator and client running
 # locally on the same machine
 # locally on the same machine

+ 1 - 1
ci/pr-snap.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 #
 #
 # Only run snap.sh for pull requests that modify files under /snap
 # Only run snap.sh for pull requests that modify files under /snap
 #
 #

+ 1 - 1
ci/publish-book.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 cd "$(dirname "$0")/.."
 cd "$(dirname "$0")/.."
 
 

+ 1 - 1
ci/publish-bpf-sdk.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 cd "$(dirname "$0")/.."
 cd "$(dirname "$0")/.."
 
 

+ 1 - 1
ci/publish-crate.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 cd "$(dirname "$0")/.."
 cd "$(dirname "$0")/.."
 
 

+ 1 - 1
ci/publish-solana-tar.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 cd "$(dirname "$0")/.."
 cd "$(dirname "$0")/.."
 
 

+ 1 - 1
ci/run-local.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 #
 #
 # Run the entire buildkite CI pipeline locally for pre-testing before sending a
 # Run the entire buildkite CI pipeline locally for pre-testing before sending a
 # Github pull request
 # Github pull request

+ 1 - 1
ci/shellcheck.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 #
 #
 # Reference: https://github.com/koalaman/shellcheck/wiki/Directive
 # Reference: https://github.com/koalaman/shellcheck/wiki/Directive
 
 

+ 1 - 1
ci/snap.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 cd "$(dirname "$0")/.."
 cd "$(dirname "$0")/.."
 
 

+ 1 - 1
ci/test-bench.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 cd "$(dirname "$0")/.."
 cd "$(dirname "$0")/.."
 
 

+ 1 - 1
ci/test-large-network.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 here=$(dirname "$0")
 here=$(dirname "$0")
 cd "$here"/..
 cd "$here"/..

+ 1 - 1
ci/test-nightly.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 cd "$(dirname "$0")/.."
 cd "$(dirname "$0")/.."
 source ci/upload_ci_artifact.sh
 source ci/upload_ci_artifact.sh

+ 1 - 1
ci/test-stable-perf.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 cd "$(dirname "$0")/.."
 cd "$(dirname "$0")/.."
 
 

+ 1 - 1
ci/test-stable.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 cd "$(dirname "$0")/.."
 cd "$(dirname "$0")/.."
 
 

+ 1 - 1
ci/testnet-automation-cleanup.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 cd "$(dirname "$0")/.."
 cd "$(dirname "$0")/.."
 
 

+ 1 - 1
ci/testnet-automation.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 cd "$(dirname "$0")/.."
 cd "$(dirname "$0")/.."
 
 

+ 1 - 1
ci/testnet-deploy.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 cd "$(dirname "$0")"/..
 cd "$(dirname "$0")"/..
 
 

+ 1 - 1
ci/testnet-manager.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 cd "$(dirname "$0")"/..
 cd "$(dirname "$0")"/..
 
 

+ 1 - 1
ci/testnet-sanity.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 cd "$(dirname "$0")/.."
 cd "$(dirname "$0")/.."
 
 

+ 1 - 1
ci/version-check.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 require() {
 require() {
   declare expectedProgram="$1"
   declare expectedProgram="$1"

+ 1 - 1
fetch-perf-libs.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 if [[ $(uname) != Linux ]]; then
 if [[ $(uname) != Linux ]]; then
   echo Performance libraries are only available for Linux
   echo Performance libraries are only available for Linux

+ 1 - 1
multinode-demo/client.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 here=$(dirname "$0")
 here=$(dirname "$0")
 # shellcheck source=multinode-demo/common.sh
 # shellcheck source=multinode-demo/common.sh

+ 1 - 1
multinode-demo/drone.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 #
 # Starts an instance of solana-drone
 # Starts an instance of solana-drone
 #
 #

+ 1 - 1
multinode-demo/leader.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 #
 # Starts a leader node
 # Starts a leader node
 #
 #

+ 1 - 1
multinode-demo/setup.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 #
 # Creates a fullnode configuration
 # Creates a fullnode configuration
 #
 #

+ 1 - 1
multinode-demo/validator-x.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 #
 # Start a dynamically-configured validator node
 # Start a dynamically-configured validator node
 #
 #

+ 1 - 1
multinode-demo/validator.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 #
 # Start a validator node
 # Start a validator node
 #
 #

+ 2 - 2
net/gce.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 here=$(dirname "$0")
 here=$(dirname "$0")
 # shellcheck source=net/common.sh
 # shellcheck source=net/common.sh
@@ -380,7 +380,7 @@ EOF
 
 
   declare startupScript="$netConfigDir"/instance-startup-script.sh
   declare startupScript="$netConfigDir"/instance-startup-script.sh
   cat > "$startupScript" <<EOF
   cat > "$startupScript" <<EOF
-#!/bin/bash -ex
+#!/usr/bin/env bash -ex
 # autogenerated at $(date)
 # autogenerated at $(date)
 
 
 cat > /etc/motd <<EOM
 cat > /etc/motd <<EOM

+ 1 - 1
net/init-metrics.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 here=$(dirname "$0")
 here=$(dirname "$0")
 # shellcheck source=net/common.sh
 # shellcheck source=net/common.sh

+ 1 - 1
net/net.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 here=$(dirname "$0")
 here=$(dirname "$0")
 SOLANA_ROOT="$(cd "$here"/..; pwd)"
 SOLANA_ROOT="$(cd "$here"/..; pwd)"

+ 1 - 1
net/remote/remote-client.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 cd "$(dirname "$0")"/../..
 cd "$(dirname "$0")"/../..
 
 

+ 1 - 1
net/remote/remote-node.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 cd "$(dirname "$0")"/../..
 cd "$(dirname "$0")"/../..
 
 

+ 1 - 1
net/remote/remote-sanity.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 #
 #
 # This script is to be run on the leader node
 # This script is to be run on the leader node
 #
 #

+ 1 - 1
net/scripts/add-solana-user-authorized_keys.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -ex
+#!/usr/bin/env bash -ex
 
 
 [[ $(uname) = Linux ]] || exit 1
 [[ $(uname) = Linux ]] || exit 1
 [[ $USER = root ]] || exit 1
 [[ $USER = root ]] || exit 1

+ 1 - 1
net/scripts/create-solana-user.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -ex
+#!/usr/bin/env bash -ex
 
 
 [[ $(uname) = Linux ]] || exit 1
 [[ $(uname) = Linux ]] || exit 1
 [[ $USER = root ]] || exit 1
 [[ $USER = root ]] || exit 1

+ 1 - 1
net/scripts/disable-background-upgrades.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -ex
+#!/usr/bin/env bash -ex
 #
 #
 # Prevent background upgrades that block |apt-get|
 # Prevent background upgrades that block |apt-get|
 #
 #

+ 1 - 1
net/scripts/install-docker.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -ex
+#!/usr/bin/env bash -ex
 
 
 [[ $(uname) = Linux ]] || exit 1
 [[ $(uname) = Linux ]] || exit 1
 [[ $USER = root ]] || exit 1
 [[ $USER = root ]] || exit 1

+ 1 - 1
net/scripts/install-earlyoom.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -ex
+#!/usr/bin/env bash -ex
 #
 #
 # Install EarlyOOM
 # Install EarlyOOM
 #
 #

+ 1 - 1
net/scripts/install-libssl-compatability.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -ex
+#!/usr/bin/env bash -ex
 
 
 [[ $(uname) = Linux ]] || exit 1
 [[ $(uname) = Linux ]] || exit 1
 [[ $USER = root ]] || exit 1
 [[ $USER = root ]] || exit 1

+ 1 - 1
net/scripts/install-rsync.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -ex
+#!/usr/bin/env bash -ex
 #
 #
 # Rsync setup for Snap builds
 # Rsync setup for Snap builds
 #
 #

+ 1 - 1
net/scripts/network-config.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -ex
+#!/usr/bin/env bash -ex
 #
 #
 
 
 [[ $(uname) = Linux ]] || exit 1
 [[ $(uname) = Linux ]] || exit 1

+ 1 - 1
net/scripts/remove-docker-interface.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -ex
+#!/usr/bin/env bash -ex
 #
 #
 # Some instances have docker running and docker0 network interface confuses
 # Some instances have docker running and docker0 network interface confuses
 # gossip and airdrops fail.  As a workaround for now simply remove the docker0
 # gossip and airdrops fail.  As a workaround for now simply remove the docker0

+ 1 - 1
net/scripts/rsync-retry.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 #
 # rsync wrapper that retries a few times on failure
 # rsync wrapper that retries a few times on failure
 #
 #

+ 1 - 1
net/scripts/update-default-cuda.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -ex
+#!/usr/bin/env bash -ex
 #
 #
 # Updates the default cuda symlink to the supported version
 # Updates the default cuda symlink to the supported version
 #
 #

+ 1 - 1
net/ssh.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 
 here=$(dirname "$0")
 here=$(dirname "$0")
 # shellcheck source=net/common.sh
 # shellcheck source=net/common.sh

+ 1 - 1
programs/bpf/rust/noop/build.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -ex
+#!/usr/bin/env bash -ex
 
 
 # TODO building release flavor with rust produces a bunch of output .bc files
 # TODO building release flavor with rust produces a bunch of output .bc files
 INTERDIR=../../../target/release
 INTERDIR=../../../target/release

+ 1 - 1
scripts/increment-cargo-version.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 usage() {
 usage() {
   cat <<EOF
   cat <<EOF

+ 1 - 1
scripts/install-native-programs.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 #
 #
 # Installs native programs as |cargo install| doesn't know about them
 # Installs native programs as |cargo install| doesn't know about them
 #
 #

+ 1 - 1
scripts/metrics-write-datapoint.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 #
 #
 # Send a metrics datapoint
 # Send a metrics datapoint
 #
 #

+ 1 - 1
scripts/net-stats.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 #
 #
 # Reports network statistics
 # Reports network statistics
 #
 #

+ 1 - 1
scripts/oom-monitor.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 #
 #
 # Reports Linux OOM Killer activity
 # Reports Linux OOM Killer activity
 #
 #

+ 1 - 1
scripts/snap-config-to-env.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 #
 # Snap daemons have no access to the environment so |snap set solana ...| is
 # Snap daemons have no access to the environment so |snap set solana ...| is
 # used to set runtime configuration.
 # used to set runtime configuration.

+ 1 - 1
scripts/wallet-help.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 
 
 cd "$(dirname "$0")"/..
 cd "$(dirname "$0")"/..
 
 

+ 1 - 1
scripts/wallet-sanity.sh

@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
 #
 #
 # Wallet sanity test
 # Wallet sanity test
 #
 #