Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
codemod --extensions sh '#!/bin/bash' '#!/usr/bin/env bash'
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Nov 12, 2018
1 parent cf6f344 commit 33aab09
Show file tree
Hide file tree
Showing 65 changed files with 66 additions and 66 deletions.
2 changes: 1 addition & 1 deletion ci/audit.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash -e
#
# Audits project dependencies for security vulnerabilities
#
Expand Down
2 changes: 1 addition & 1 deletion ci/channel-info.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Computes the current branch names of the edge, beta and stable
# channels, as well as the latest tagged release for beta and stable.
Expand Down
2 changes: 1 addition & 1 deletion ci/crate-version.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash -e
#
# Outputs the current crate version
#
Expand Down
2 changes: 1 addition & 1 deletion ci/docker-run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash -e

usage() {
echo "Usage: $0 [--nopull] [docker image name] [command]"
Expand Down
2 changes: 1 addition & 1 deletion ci/docker-rust-nightly/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -ex
#!/usr/bin/env bash -ex

cd "$(dirname "$0")"

Expand Down
2 changes: 1 addition & 1 deletion ci/docker-rust/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -ex
#!/usr/bin/env bash -ex

cd "$(dirname "$0")"

Expand Down
2 changes: 1 addition & 1 deletion ci/docker-snapcraft/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -ex
#!/usr/bin/env bash -ex

cd "$(dirname "$0")"

Expand Down
2 changes: 1 addition & 1 deletion ci/docker-solana/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -ex
#!/usr/bin/env bash -ex

cd "$(dirname "$0")"
eval "$(../channel-info.sh)"
Expand Down
2 changes: 1 addition & 1 deletion ci/docker-solana/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -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_BACKTRACE=1
Expand Down
2 changes: 1 addition & 1 deletion ci/hoover.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Regular maintenance performed on a buildkite agent to control disk usage
#
Expand Down
2 changes: 1 addition & 1 deletion ci/is-pr.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash -e
#
# 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
Expand Down
2 changes: 1 addition & 1 deletion ci/localnet-sanity.sh
Original file line number Diff line number Diff line change
@@ -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
# locally on the same machine
Expand Down
2 changes: 1 addition & 1 deletion ci/pr-snap.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash -e
#
# Only run snap.sh for pull requests that modify files under /snap
#
Expand Down
2 changes: 1 addition & 1 deletion ci/publish-book.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash -e

cd "$(dirname "$0")/.."

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

cd "$(dirname "$0")/.."

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

cd "$(dirname "$0")/.."

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

cd "$(dirname "$0")/.."

Expand Down
2 changes: 1 addition & 1 deletion ci/run-local.sh
Original file line number Diff line number Diff line change
@@ -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
# Github pull request
Expand Down
2 changes: 1 addition & 1 deletion ci/shellcheck.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash -e
#
# Reference: https://github.com/koalaman/shellcheck/wiki/Directive

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

cd "$(dirname "$0")/.."

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

cd "$(dirname "$0")/.."

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

here=$(dirname "$0")
cd "$here"/..
Expand Down
2 changes: 1 addition & 1 deletion ci/test-nightly.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash -e

cd "$(dirname "$0")/.."
source ci/upload_ci_artifact.sh
Expand Down
2 changes: 1 addition & 1 deletion ci/test-stable-perf.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash -e

cd "$(dirname "$0")/.."

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

cd "$(dirname "$0")/.."

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

cd "$(dirname "$0")/.."

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

cd "$(dirname "$0")/.."

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

cd "$(dirname "$0")"/..

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

cd "$(dirname "$0")"/..

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

cd "$(dirname "$0")/.."

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

require() {
declare expectedProgram="$1"
Expand Down
2 changes: 1 addition & 1 deletion fetch-perf-libs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash -e

if [[ $(uname) != Linux ]]; then
echo Performance libraries are only available for Linux
Expand Down
2 changes: 1 addition & 1 deletion multinode-demo/client.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash -e

here=$(dirname "$0")
# shellcheck source=multinode-demo/common.sh
Expand Down
2 changes: 1 addition & 1 deletion multinode-demo/drone.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Starts an instance of solana-drone
#
Expand Down
2 changes: 1 addition & 1 deletion multinode-demo/leader.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Starts a leader node
#
Expand Down
2 changes: 1 addition & 1 deletion multinode-demo/setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Creates a fullnode configuration
#
Expand Down
2 changes: 1 addition & 1 deletion multinode-demo/validator-x.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Start a dynamically-configured validator node
#
Expand Down
2 changes: 1 addition & 1 deletion multinode-demo/validator.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Start a validator node
#
Expand Down
4 changes: 2 additions & 2 deletions net/gce.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash -e

here=$(dirname "$0")
# shellcheck source=net/common.sh
Expand Down Expand Up @@ -380,7 +380,7 @@ EOF

declare startupScript="$netConfigDir"/instance-startup-script.sh
cat > "$startupScript" <<EOF
#!/bin/bash -ex
#!/usr/bin/env bash -ex
# autogenerated at $(date)
cat > /etc/motd <<EOM
Expand Down
2 changes: 1 addition & 1 deletion net/init-metrics.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash -e

here=$(dirname "$0")
# shellcheck source=net/common.sh
Expand Down
2 changes: 1 addition & 1 deletion net/net.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash -e

here=$(dirname "$0")
SOLANA_ROOT="$(cd "$here"/..; pwd)"
Expand Down
2 changes: 1 addition & 1 deletion net/remote/remote-client.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash -e

cd "$(dirname "$0")"/../..

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

cd "$(dirname "$0")"/../..

Expand Down
2 changes: 1 addition & 1 deletion net/remote/remote-sanity.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash -e
#
# This script is to be run on the leader node
#
Expand Down
2 changes: 1 addition & 1 deletion net/scripts/add-solana-user-authorized_keys.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -ex
#!/usr/bin/env bash -ex

[[ $(uname) = Linux ]] || exit 1
[[ $USER = root ]] || exit 1
Expand Down
2 changes: 1 addition & 1 deletion net/scripts/create-solana-user.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -ex
#!/usr/bin/env bash -ex

[[ $(uname) = Linux ]] || exit 1
[[ $USER = root ]] || exit 1
Expand Down
2 changes: 1 addition & 1 deletion net/scripts/disable-background-upgrades.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -ex
#!/usr/bin/env bash -ex
#
# Prevent background upgrades that block |apt-get|
#
Expand Down
2 changes: 1 addition & 1 deletion net/scripts/install-docker.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -ex
#!/usr/bin/env bash -ex

[[ $(uname) = Linux ]] || exit 1
[[ $USER = root ]] || exit 1
Expand Down
2 changes: 1 addition & 1 deletion net/scripts/install-earlyoom.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -ex
#!/usr/bin/env bash -ex
#
# Install EarlyOOM
#
Expand Down
2 changes: 1 addition & 1 deletion net/scripts/install-libssl-compatability.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -ex
#!/usr/bin/env bash -ex

[[ $(uname) = Linux ]] || exit 1
[[ $USER = root ]] || exit 1
Expand Down
2 changes: 1 addition & 1 deletion net/scripts/install-rsync.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -ex
#!/usr/bin/env bash -ex
#
# Rsync setup for Snap builds
#
Expand Down
2 changes: 1 addition & 1 deletion net/scripts/network-config.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -ex
#!/usr/bin/env bash -ex
#

[[ $(uname) = Linux ]] || exit 1
Expand Down
2 changes: 1 addition & 1 deletion net/scripts/remove-docker-interface.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -ex
#!/usr/bin/env bash -ex
#
# Some instances have docker running and docker0 network interface confuses
# gossip and airdrops fail. As a workaround for now simply remove the docker0
Expand Down
2 changes: 1 addition & 1 deletion net/scripts/rsync-retry.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# rsync wrapper that retries a few times on failure
#
Expand Down
2 changes: 1 addition & 1 deletion net/scripts/update-default-cuda.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -ex
#!/usr/bin/env bash -ex
#
# Updates the default cuda symlink to the supported version
#
Expand Down
2 changes: 1 addition & 1 deletion net/ssh.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

here=$(dirname "$0")
# shellcheck source=net/common.sh
Expand Down
2 changes: 1 addition & 1 deletion programs/bpf/rust/noop/build.sh
Original file line number Diff line number Diff line change
@@ -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
INTERDIR=../../../target/release
Expand Down
2 changes: 1 addition & 1 deletion scripts/increment-cargo-version.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash -e

usage() {
cat <<EOF
Expand Down
2 changes: 1 addition & 1 deletion scripts/install-native-programs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash -e
#
# Installs native programs as |cargo install| doesn't know about them
#
Expand Down
2 changes: 1 addition & 1 deletion scripts/metrics-write-datapoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash -e
#
# Send a metrics datapoint
#
Expand Down
2 changes: 1 addition & 1 deletion scripts/net-stats.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash -e
#
# Reports network statistics
#
Expand Down
2 changes: 1 addition & 1 deletion scripts/oom-monitor.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash -e
#
# Reports Linux OOM Killer activity
#
Expand Down
2 changes: 1 addition & 1 deletion scripts/snap-config-to-env.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Snap daemons have no access to the environment so |snap set solana ...| is
# used to set runtime configuration.
Expand Down
2 changes: 1 addition & 1 deletion scripts/wallet-help.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env bash -e

cd "$(dirname "$0")"/..

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

0 comments on commit 33aab09

Please sign in to comment.