diff --git a/packages/proto-signing/scripts/define-proto.sh b/packages/proto-signing/scripts/define-proto.sh
index 16735b8b35..ac077ff0d4 100755
--- a/packages/proto-signing/scripts/define-proto.sh
+++ b/packages/proto-signing/scripts/define-proto.sh
@@ -1,13 +1,12 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
TMP_DIR="./tmp"
JS_SOURCE_FILE="$TMP_DIR/codecimpl.js"
DEFINITIONS_FILE="$TMP_DIR/codecimpl.d.ts"
OUTPUT_DIR="./src/codec/generated/"
-
yarn pbts "$JS_SOURCE_FILE" -o "$DEFINITIONS_FILE"
# Remove comments after using them for the .d.ts
# Note "When input files are specified on the command line, tsconfig.json files are ignored." (https://www.typescriptlang.org/docs/handbook/tsconfig-json.html)
diff --git a/packages/proto-signing/scripts/get-proto.sh b/packages/proto-signing/scripts/get-proto.sh
index b9ff708c73..646888438f 100755
--- a/packages/proto-signing/scripts/get-proto.sh
+++ b/packages/proto-signing/scripts/get-proto.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
PROTO_DIR="./proto"
COSMOS_DIR="$PROTO_DIR/cosmos"
diff --git a/packages/proto-signing/scripts/predefine-proto.sh b/packages/proto-signing/scripts/predefine-proto.sh
index 2cc2f5b62c..0f23dfc714 100755
--- a/packages/proto-signing/scripts/predefine-proto.sh
+++ b/packages/proto-signing/scripts/predefine-proto.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
GENERATED_DIR="./tmp"
ROOT_PROTO_DIR="./proto/cosmos/cosmos-sdk"
diff --git a/packages/stargate/scripts/define-proto.sh b/packages/stargate/scripts/define-proto.sh
index 16735b8b35..ac077ff0d4 100755
--- a/packages/stargate/scripts/define-proto.sh
+++ b/packages/stargate/scripts/define-proto.sh
@@ -1,13 +1,12 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
TMP_DIR="./tmp"
JS_SOURCE_FILE="$TMP_DIR/codecimpl.js"
DEFINITIONS_FILE="$TMP_DIR/codecimpl.d.ts"
OUTPUT_DIR="./src/codec/generated/"
-
yarn pbts "$JS_SOURCE_FILE" -o "$DEFINITIONS_FILE"
# Remove comments after using them for the .d.ts
# Note "When input files are specified on the command line, tsconfig.json files are ignored." (https://www.typescriptlang.org/docs/handbook/tsconfig-json.html)
diff --git a/packages/stargate/scripts/get-proto.sh b/packages/stargate/scripts/get-proto.sh
index b9ff708c73..646888438f 100755
--- a/packages/stargate/scripts/get-proto.sh
+++ b/packages/stargate/scripts/get-proto.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
PROTO_DIR="./proto"
COSMOS_DIR="$PROTO_DIR/cosmos"
diff --git a/packages/stargate/scripts/predefine-proto.sh b/packages/stargate/scripts/predefine-proto.sh
index 5c05e91c12..d41d16329f 100755
--- a/packages/stargate/scripts/predefine-proto.sh
+++ b/packages/stargate/scripts/predefine-proto.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
GENERATED_DIR="./tmp"
ROOT_PROTO_DIR="./proto/cosmos/cosmos-sdk"
diff --git a/scripts/add_nonces.sh b/scripts/add_nonces.sh
index bcc0e29e0b..aa89abc7b1 100755
--- a/scripts/add_nonces.sh
+++ b/scripts/add_nonces.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
# This must be called from repo root as current directory
@@ -10,7 +10,7 @@ for packagedir in ./packages/*; do
if [[ -d "$packagedir" ]]; then
mkdir -p "$packagedir/nonces"
echo "Directory used to trigger lerna package updates for all packages" \
- > "$packagedir/nonces/README.txt"
+ >"$packagedir/nonces/README.txt"
touch "$packagedir/nonces/$NONCE"
echo "Added nonce to package $packagedir"
fi
diff --git a/scripts/docs/copy_docs.sh b/scripts/docs/copy_docs.sh
index 0acd357b06..359f0db20d 100755
--- a/scripts/docs/copy_docs.sh
+++ b/scripts/docs/copy_docs.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
version="latest"
out_dir="./docs_deployment"
@@ -21,11 +21,11 @@ cp docs/cosmjs-tree.png "$assets_dir"
echo '
Package documentation
'
echo 'The following packages can be used as libraries.
'
echo ''
-} > "$index"
+} >"$index"
-for package_dir in ./packages/*/ ; do
+for package_dir in ./packages/*/; do
package_basename="$(basename "$package_dir")"
- package_name="$(jq -r .name < "$package_dir"/package.json)"
+ package_name="$(jq -r .name <"$package_dir"/package.json)"
package_docs_src="$(realpath "$package_dir")/docs"
package_docs_dest="$out_dir/$version/$package_basename"
@@ -34,7 +34,7 @@ for package_dir in ./packages/*/ ; do
echo "$package_basename: $package_docs_src -> $package_docs_dest"
cp -R "$package_docs_src/"* "$package_docs_dest"
- echo " - $package_name
" >> "$index"
+ echo " - $package_name
" >>"$index"
fi
done
@@ -44,4 +44,4 @@ done
echo ''
-} >> "$index"
+} >>"$index"
diff --git a/scripts/launchpad/cli.sh b/scripts/launchpad/cli.sh
index 1f47399524..42afceeaa3 100755
--- a/scripts/launchpad/cli.sh
+++ b/scripts/launchpad/cli.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
SCRIPT_DIR="$(realpath "$(dirname "$0")")"
# shellcheck source=./env
diff --git a/scripts/launchpad/generate_template.sh b/scripts/launchpad/generate_template.sh
index b2b981b7fc..15caedbfc8 100755
--- a/scripts/launchpad/generate_template.sh
+++ b/scripts/launchpad/generate_template.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
SCRIPT_DIR="$(realpath "$(dirname "$0")")"
# shellcheck source=./env
@@ -34,9 +34,9 @@ function inline_jq() {
shift
TMP_DIR=$(mktemp -d "${TMPDIR:-/tmp}/inline_jq.XXXXXXXXX")
TMP_FILE="$TMP_DIR/$(basename "$IN_OUT_PATH")"
- jq "$@" < "$IN_OUT_PATH" > "$TMP_FILE"
- if ! mv "$TMP_FILE" "$IN_OUT_PATH" ; then
- >&2 echo "Temp file '$TMP_FILE' could not be deleted. If it contains sensitive data, you might want to delete it manually."
+ jq "$@" <"$IN_OUT_PATH" >"$TMP_FILE"
+ if ! mv "$TMP_FILE" "$IN_OUT_PATH"; then
+ echo >&2 "Temp file '$TMP_FILE' could not be deleted. If it contains sensitive data, you might want to delete it manually."
exit 3
fi
}
diff --git a/scripts/launchpad/init.sh b/scripts/launchpad/init.sh
index 114762503d..484400d38e 100755
--- a/scripts/launchpad/init.sh
+++ b/scripts/launchpad/init.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
echo "Waiting for blockchain and REST server to be available ..."
timeout 60 bash -c "until curl -s http://localhost:1317/node_info > /dev/null; do sleep 0.5; done"
@@ -10,7 +10,6 @@ echo "Okay, thank you for your patience."
SCRIPT_DIR="$(realpath "$(dirname "$0")")"
-
#
# Cosmos SDK init
#
diff --git a/scripts/launchpad/manual_start.sh b/scripts/launchpad/manual_start.sh
index a203e7bca5..4bfa00c13e 100755
--- a/scripts/launchpad/manual_start.sh
+++ b/scripts/launchpad/manual_start.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
## This is like start.sh but using local binaries, not docker images
SCRIPT_DIR="$(realpath "$(dirname "$0")")"
@@ -18,7 +18,7 @@ wasmd start \
--home "$TMP_DIR/.wasmd" \
--trace \
--rpc.laddr tcp://0.0.0.0:26657 \
- > "$WASMD_LOGFILE" &
+ >"$WASMD_LOGFILE" &
echo "wasmd running and logging into $WASMD_LOGFILE"
@@ -30,7 +30,7 @@ wasmcli rest-server \
--node tcp://localhost:26657 \
--trust-node \
--laddr tcp://0.0.0.0:1317 \
- > "$REST_SERVER_LOGFILE" &
+ >"$REST_SERVER_LOGFILE" &
echo "rest server running on http://localhost:1317 and logging into $REST_SERVER_LOGFILE"
diff --git a/scripts/launchpad/start.sh b/scripts/launchpad/start.sh
index 4e306070c0..0c753e2dc1 100755
--- a/scripts/launchpad/start.sh
+++ b/scripts/launchpad/start.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
# Please keep this in sync with the Ports overview in HACKING.md
# Tendermint port (26657) and p2p port (26656) are not exposed since we don't need them for testing
@@ -29,7 +29,7 @@ docker run --rm \
--mount type=volume,source=launchpad_data,target=/root \
"$REPOSITORY:$VERSION" \
./run_wasmd.sh /template \
- > "$WASMD_LOGFILE" &
+ >"$WASMD_LOGFILE" &
echo "wasmd running and logging into $WASMD_LOGFILE"
@@ -51,7 +51,7 @@ docker exec "$CONTAINER_NAME" \
--trust-node \
--unsafe-cors \
--laddr "tcp://0.0.0.0:$LCD_API_PORT_GUEST" \
- > "$REST_SERVER_LOGFILE" &
+ >"$REST_SERVER_LOGFILE" &
echo "rest server running on http://localhost:$LCD_API_PORT_HOST and logging into $REST_SERVER_LOGFILE"
diff --git a/scripts/launchpad/stop.sh b/scripts/launchpad/stop.sh
index a318ce454f..e29cbac1eb 100755
--- a/scripts/launchpad/stop.sh
+++ b/scripts/launchpad/stop.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
SCRIPT_DIR="$(realpath "$(dirname "$0")")"
# shellcheck source=./env
diff --git a/scripts/simapp/generate_template.sh b/scripts/simapp/generate_template.sh
index f271b8324d..fdfb9385ac 100755
--- a/scripts/simapp/generate_template.sh
+++ b/scripts/simapp/generate_template.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
SCRIPT_DIR="$(realpath "$(dirname "$0")")"
# shellcheck source=./env
@@ -37,9 +37,9 @@ function inline_jq() {
shift
TMP_DIR=$(mktemp -d "${TMPDIR:-/tmp}/inline_jq.XXXXXXXXX")
TMP_FILE="$TMP_DIR/$(basename "$IN_OUT_PATH")"
- jq "$@" < "$IN_OUT_PATH" > "$TMP_FILE"
- if ! mv "$TMP_FILE" "$IN_OUT_PATH" ; then
- >&2 echo "Temp file '$TMP_FILE' could not be deleted. If it contains sensitive data, you might want to delete it manually."
+ jq "$@" <"$IN_OUT_PATH" >"$TMP_FILE"
+ if ! mv "$TMP_FILE" "$IN_OUT_PATH"; then
+ echo >&2 "Temp file '$TMP_FILE' could not be deleted. If it contains sensitive data, you might want to delete it manually."
exit 3
fi
}
diff --git a/scripts/simapp/run_simd.sh b/scripts/simapp/run_simd.sh
index 3264dacc79..9334906b2a 100644
--- a/scripts/simapp/run_simd.sh
+++ b/scripts/simapp/run_simd.sh
@@ -1,6 +1,6 @@
#!/bin/sh
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
cp -R "/template/.simapp" /root
mkdir -p /root/log
diff --git a/scripts/simapp/setup.sh b/scripts/simapp/setup.sh
index 0a81a3ce7c..b41095147c 100644
--- a/scripts/simapp/setup.sh
+++ b/scripts/simapp/setup.sh
@@ -1,6 +1,6 @@
#!/bin/sh
set -o errexit -o nounset
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
PASSWORD=${PASSWORD:-1234567890}
CHAIN_ID=${CHAIN_ID:-simd-testing}
@@ -18,9 +18,12 @@ simd init --chain-id "$CHAIN_ID" "$MONIKER"
sed -i "s/\"stake\"/\"$STAKE\"/" "$HOME"/.simapp/config/genesis.json # staking/governance token is hardcoded in config, change this
echo "Setting up validator ..."
-if ! simd keys show validator 2> /dev/null; then
+if ! simd keys show validator 2>/dev/null; then
echo "Validator does not yet exist. Creating it ..."
- (echo "$PASSWORD"; echo "$PASSWORD") | simd keys add validator
+ (
+ echo "$PASSWORD"
+ echo "$PASSWORD"
+ ) | simd keys add validator
fi
# hardcode the validator account for this instance
echo "$PASSWORD" | simd add-genesis-account validator "$START_BALANCE"
@@ -34,5 +37,9 @@ done
echo "Creating genesis tx ..."
SELF_DELEGATION="3000000$STAKE" # 3 STAKE (leads to a voting power of 3)
-(echo "$PASSWORD"; echo "$PASSWORD"; echo "$PASSWORD") | simd gentx validator --offline --amount "$SELF_DELEGATION" --chain-id "$CHAIN_ID" --moniker="$MONIKER"
+(
+ echo "$PASSWORD"
+ echo "$PASSWORD"
+ echo "$PASSWORD"
+) | simd gentx validator --offline --amount "$SELF_DELEGATION" --chain-id "$CHAIN_ID" --moniker="$MONIKER"
simd collect-gentxs
diff --git a/scripts/simapp/start.sh b/scripts/simapp/start.sh
index 858fba4c7b..7ee2d668b3 100755
--- a/scripts/simapp/start.sh
+++ b/scripts/simapp/start.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
# Please keep this in sync with the Ports overview in HACKING.md
TENDERMINT_PORT_GUEST="26657"
@@ -29,7 +29,7 @@ docker run --rm \
--mount type=volume,source=simapp_data,target=/root \
"$REPOSITORY:$VERSION" \
/template/run_simd.sh \
- > "$SIMD_LOGFILE" &
+ >"$SIMD_LOGFILE" &
echo "simd running on http://localhost:$TENDERMINT_PORT_HOST and logging into $SIMD_LOGFILE"
diff --git a/scripts/simapp/stop.sh b/scripts/simapp/stop.sh
index a2fd208999..9497d937c0 100755
--- a/scripts/simapp/stop.sh
+++ b/scripts/simapp/stop.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
SCRIPT_DIR="$(realpath "$(dirname "$0")")"
# shellcheck source=./env
diff --git a/scripts/simapp/template/run_simd.sh b/scripts/simapp/template/run_simd.sh
index 3264dacc79..9334906b2a 100755
--- a/scripts/simapp/template/run_simd.sh
+++ b/scripts/simapp/template/run_simd.sh
@@ -1,6 +1,6 @@
#!/bin/sh
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
cp -R "/template/.simapp" /root
mkdir -p /root/log
diff --git a/scripts/simapp/template/setup.sh b/scripts/simapp/template/setup.sh
index 0a81a3ce7c..b41095147c 100755
--- a/scripts/simapp/template/setup.sh
+++ b/scripts/simapp/template/setup.sh
@@ -1,6 +1,6 @@
#!/bin/sh
set -o errexit -o nounset
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
PASSWORD=${PASSWORD:-1234567890}
CHAIN_ID=${CHAIN_ID:-simd-testing}
@@ -18,9 +18,12 @@ simd init --chain-id "$CHAIN_ID" "$MONIKER"
sed -i "s/\"stake\"/\"$STAKE\"/" "$HOME"/.simapp/config/genesis.json # staking/governance token is hardcoded in config, change this
echo "Setting up validator ..."
-if ! simd keys show validator 2> /dev/null; then
+if ! simd keys show validator 2>/dev/null; then
echo "Validator does not yet exist. Creating it ..."
- (echo "$PASSWORD"; echo "$PASSWORD") | simd keys add validator
+ (
+ echo "$PASSWORD"
+ echo "$PASSWORD"
+ ) | simd keys add validator
fi
# hardcode the validator account for this instance
echo "$PASSWORD" | simd add-genesis-account validator "$START_BALANCE"
@@ -34,5 +37,9 @@ done
echo "Creating genesis tx ..."
SELF_DELEGATION="3000000$STAKE" # 3 STAKE (leads to a voting power of 3)
-(echo "$PASSWORD"; echo "$PASSWORD"; echo "$PASSWORD") | simd gentx validator --offline --amount "$SELF_DELEGATION" --chain-id "$CHAIN_ID" --moniker="$MONIKER"
+(
+ echo "$PASSWORD"
+ echo "$PASSWORD"
+ echo "$PASSWORD"
+) | simd gentx validator --offline --amount "$SELF_DELEGATION" --chain-id "$CHAIN_ID" --moniker="$MONIKER"
simd collect-gentxs
diff --git a/scripts/socketserver/start.sh b/scripts/socketserver/start.sh
index b13e3fdfe5..cdf5e25b28 100755
--- a/scripts/socketserver/start.sh
+++ b/scripts/socketserver/start.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
# Please keep this in sync with the Ports overview in HACKING.md
DEFAULT_PORT_GUEST="4000"
@@ -8,7 +8,7 @@ DEFAULT_PORT_HOST="4444"
SLOW_PORT_GUEST="4000"
SLOW_PORT_HOST="4445"
-SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SOCKETSERVER_DIR=$(mktemp -d "${TMPDIR:-/tmp}/socketserver.XXXXXXXXX")
export SOCKETSERVER_DIR
@@ -28,14 +28,14 @@ docker run --rm \
-p "$DEFAULT_PORT_HOST:$DEFAULT_PORT_GUEST" \
socketserver:local \
--delay 0 \
- > "$LOGFILE_DEFAULT" &
+ >"$LOGFILE_DEFAULT" &
docker run --rm \
--user="$UID" \
--name "$NAME_SLOW" \
-p "$SLOW_PORT_HOST:$SLOW_PORT_GUEST" \
socketserver:local \
--delay 5 \
- > "$LOGFILE_SLOW" &
+ >"$LOGFILE_SLOW" &
# Debug start
sleep 3
diff --git a/scripts/socketserver/stop.sh b/scripts/socketserver/stop.sh
index 39acd7701e..52fe30c7ef 100755
--- a/scripts/socketserver/stop.sh
+++ b/scripts/socketserver/stop.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
echo "Killing socketserver containers ..."
docker container kill "socketserver-default" "socketserver-slow"
diff --git a/scripts/tendermint/all_start.sh b/scripts/tendermint/all_start.sh
index dd0335c3cc..bbe27ca1d0 100755
--- a/scripts/tendermint/all_start.sh
+++ b/scripts/tendermint/all_start.sh
@@ -1,13 +1,13 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
# Find latest patch releases at https://hub.docker.com/r/tendermint/tendermint/tags/
declare -a TM_VERSIONS
TM_VERSIONS[33]=v0.33.8
TM_VERSIONS[34]=v0.34.0
-SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
for KEY in "${!TM_VERSIONS[@]}"; do
export TENDERMINT_VERSION="${TM_VERSIONS[$KEY]}"
diff --git a/scripts/tendermint/all_stop.sh b/scripts/tendermint/all_stop.sh
index e9f3a12745..a2ccd3e28b 100755
--- a/scripts/tendermint/all_stop.sh
+++ b/scripts/tendermint/all_stop.sh
@@ -1,12 +1,12 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
declare -a TM_VERSIONS
TM_VERSIONS[33]=v0.33.8
TM_VERSIONS[34]=v0.34.0
-SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
for KEY in "${!TM_VERSIONS[@]}"; do
export TENDERMINT_NAME="tendermint-$KEY"
diff --git a/scripts/tendermint/start.sh b/scripts/tendermint/start.sh
index c863f92a12..e5d3b65b79 100755
--- a/scripts/tendermint/start.sh
+++ b/scripts/tendermint/start.sh
@@ -1,13 +1,11 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
# Tendermint settings must be specified
# Choose version from https://hub.docker.com/r/tendermint/tendermint/tags/
-for SETTING in "TENDERMINT_VERSION" "TENDERMINT_PORT" "TENDERMINT_NAME"
-do
- if test -z "$(eval echo "\$$SETTING")"
- then
+for SETTING in "TENDERMINT_VERSION" "TENDERMINT_PORT" "TENDERMINT_NAME"; do
+ if test -z "$(eval echo "\$$SETTING")"; then
echo "\$$SETTING must be set when running this script"
exit 1
fi
@@ -38,7 +36,7 @@ docker run --rm \
--proxy_app=kvstore \
--rpc.laddr=tcp://0.0.0.0:26657 \
--log_level=state:info,rpc:info,*:error \
- > "$LOGFILE" &
+ >"$LOGFILE" &
echo "Tendermint running and logging into $LOGFILE"
diff --git a/scripts/tendermint/stop.sh b/scripts/tendermint/stop.sh
index 89692b8219..9ec66f7f07 100755
--- a/scripts/tendermint/stop.sh
+++ b/scripts/tendermint/stop.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
NAME=${TENDERMINT_NAME:-tendermint-25}
diff --git a/scripts/wasmd/cli.sh b/scripts/wasmd/cli.sh
index ed3a19f6f7..6c84f7db11 100755
--- a/scripts/wasmd/cli.sh
+++ b/scripts/wasmd/cli.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
SCRIPT_DIR="$(realpath "$(dirname "$0")")"
# shellcheck source=./env
diff --git a/scripts/wasmd/generate_template.sh b/scripts/wasmd/generate_template.sh
index 01dc975f27..a3888f7faf 100755
--- a/scripts/wasmd/generate_template.sh
+++ b/scripts/wasmd/generate_template.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
SCRIPT_DIR="$(realpath "$(dirname "$0")")"
# shellcheck source=./env
@@ -16,12 +16,12 @@ docker run --rm \
--mount type=bind,source="$SCRIPT_DIR/template",target=/root \
"$REPOSITORY:$VERSION" \
./setup_wasmd.sh \
-wasm1pkptre7fdkl6gfrzlesjjvhxhlc3r4gm32kke3 wasm10dyr9899g6t0pelew4nvf4j5c3jcgv0r5d3a5l wasm1xy4yqngt0nlkdcenxymg8tenrghmek4n3u2lwa wasm142u9fgcjdlycfcez3lw8x6x5h7rfjlnfaallkd wasm1hsm76p4ahyhl5yh3ve9ur49r5kemhp2r93f89d \
-wasm14qemq0vw6y3gc3u3e0aty2e764u4gs5lndxgyk wasm1hhg2rlu9jscacku2wwckws7932qqqu8xm5ca8y wasm1xv9tklw7d82sezh9haa573wufgy59vmwnxhnsl wasm17yg9mssjenmc3jkqth6ulcwj9cxujrxxg9nmzk wasm1f7j7ryulwjfe9ljplvhtcaxa6wqgula3nh873j \
-wasm1lvrwcvrqlc5ktzp2c4t22xgkx29q3y83426at5 wasm1vkv9sfwaak76weyamqx0flmng2vuquxqjq3flu wasm106jwym4s9aujcmes26myzzwqsccw09sd3nap5h wasm1c7wpeen2uv8thayf7g8q2rgpm29clj0dzlu7t9 wasm1mjxpv9ft30wer7ma7kwfxhm42l379xuttrjcl3 \
-wasm1cjsxept9rkggzxztslae9ndgpdyt240842kpxh \
-wasm17d0jcz59jf68g52vq38tuuncmwwjk42us8fnse \
-wasm1p6xs63q4g7np99ttv5nd3yzkt8n4qxa45jkgsk wasm1meeu3jl268txxytwmmrsljk8rawh6n2mhwp76p wasm1cak6lnpfxs035xd88sq8e4zujsm8g2g953hfan wasm1x3x8kyypx8z6q7fx3gw65x29mhl5gg8qtf4xkg wasm18c27m2rj4lg74md03ujralvt562c097nd7scqw wasm1q2y53e6x7s5mlddtd2qkcjr3nwr4dszvs4js2q wasm1paa2gstlk7c98n27dw2g6tp6fyqvf32m3x04t6 wasm1rvxjd8k6xvssz2eerfzemvat35pttfgrsz43tx wasm12zejt8d9xl70jd2333p4p265m2nr9h8g6pgmly wasm1exctm2036jtwyc9v3ftqfzmgnv9tdhj2sskt4u wasm1f3pws3ztnp3s4nn5zxqdrl9vlqv5avkq3rjfe7
+ wasm1pkptre7fdkl6gfrzlesjjvhxhlc3r4gm32kke3 wasm10dyr9899g6t0pelew4nvf4j5c3jcgv0r5d3a5l wasm1xy4yqngt0nlkdcenxymg8tenrghmek4n3u2lwa wasm142u9fgcjdlycfcez3lw8x6x5h7rfjlnfaallkd wasm1hsm76p4ahyhl5yh3ve9ur49r5kemhp2r93f89d \
+ wasm14qemq0vw6y3gc3u3e0aty2e764u4gs5lndxgyk wasm1hhg2rlu9jscacku2wwckws7932qqqu8xm5ca8y wasm1xv9tklw7d82sezh9haa573wufgy59vmwnxhnsl wasm17yg9mssjenmc3jkqth6ulcwj9cxujrxxg9nmzk wasm1f7j7ryulwjfe9ljplvhtcaxa6wqgula3nh873j \
+ wasm1lvrwcvrqlc5ktzp2c4t22xgkx29q3y83426at5 wasm1vkv9sfwaak76weyamqx0flmng2vuquxqjq3flu wasm106jwym4s9aujcmes26myzzwqsccw09sd3nap5h wasm1c7wpeen2uv8thayf7g8q2rgpm29clj0dzlu7t9 wasm1mjxpv9ft30wer7ma7kwfxhm42l379xuttrjcl3 \
+ wasm1cjsxept9rkggzxztslae9ndgpdyt240842kpxh \
+ wasm17d0jcz59jf68g52vq38tuuncmwwjk42us8fnse \
+ wasm1p6xs63q4g7np99ttv5nd3yzkt8n4qxa45jkgsk wasm1meeu3jl268txxytwmmrsljk8rawh6n2mhwp76p wasm1cak6lnpfxs035xd88sq8e4zujsm8g2g953hfan wasm1x3x8kyypx8z6q7fx3gw65x29mhl5gg8qtf4xkg wasm18c27m2rj4lg74md03ujralvt562c097nd7scqw wasm1q2y53e6x7s5mlddtd2qkcjr3nwr4dszvs4js2q wasm1paa2gstlk7c98n27dw2g6tp6fyqvf32m3x04t6 wasm1rvxjd8k6xvssz2eerfzemvat35pttfgrsz43tx wasm12zejt8d9xl70jd2333p4p265m2nr9h8g6pgmly wasm1exctm2036jtwyc9v3ftqfzmgnv9tdhj2sskt4u wasm1f3pws3ztnp3s4nn5zxqdrl9vlqv5avkq3rjfe7
# The ./template folder is created by the docker daemon's user (root on Linux, current user
# when using Docker Desktop on macOS), let's make it ours if needed
@@ -34,9 +34,9 @@ function inline_jq() {
shift
TMP_DIR=$(mktemp -d "${TMPDIR:-/tmp}/inline_jq.XXXXXXXXX")
TMP_FILE="$TMP_DIR/$(basename "$IN_OUT_PATH")"
- jq "$@" < "$IN_OUT_PATH" > "$TMP_FILE"
- if ! mv "$TMP_FILE" "$IN_OUT_PATH" ; then
- >&2 echo "Temp file '$TMP_FILE' could not be deleted. If it contains sensitive data, you might want to delete it manually."
+ jq "$@" <"$IN_OUT_PATH" >"$TMP_FILE"
+ if ! mv "$TMP_FILE" "$IN_OUT_PATH"; then
+ echo >&2 "Temp file '$TMP_FILE' could not be deleted. If it contains sensitive data, you might want to delete it manually."
exit 3
fi
}
diff --git a/scripts/wasmd/init.sh b/scripts/wasmd/init.sh
index f3bf74a343..87a2283706 100755
--- a/scripts/wasmd/init.sh
+++ b/scripts/wasmd/init.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
echo "Waiting for blockchain and REST server to be available ..."
timeout 60 bash -c "until curl -s http://localhost:1319/node_info > /dev/null; do sleep 0.5; done"
@@ -10,10 +10,8 @@ echo "Waiting for height to be >= 1 ..."
timeout 20 bash -c "until [ \"\$( curl -s http://localhost:1319/blocks/latest | jq -r '.block.header.height // 0' )\" -ge 1 ]; do sleep 0.5; done"
echo "Okay, thank you for your patience."
-
SCRIPT_DIR="$(realpath "$(dirname "$0")")"
-
#
# Cosmos SDK init
#
diff --git a/scripts/wasmd/start.sh b/scripts/wasmd/start.sh
index 726fdbfdb7..5cf548679e 100755
--- a/scripts/wasmd/start.sh
+++ b/scripts/wasmd/start.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
# Please keep this in sync with the Ports overview in HACKING.md
TENDERMINT_PORT_GUEST="26657"
@@ -30,7 +30,7 @@ docker run --rm \
--mount type=volume,source=wasmd_data,target=/root \
"$REPOSITORY:$VERSION" \
./run_wasmd.sh /template \
- > "$WASMD_LOGFILE" &
+ >"$WASMD_LOGFILE" &
echo "wasmd running and logging into $WASMD_LOGFILE"
diff --git a/scripts/wasmd/stop.sh b/scripts/wasmd/stop.sh
index a318ce454f..e29cbac1eb 100755
--- a/scripts/wasmd/stop.sh
+++ b/scripts/wasmd/stop.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
-command -v shellcheck > /dev/null && shellcheck "$0"
+command -v shellcheck >/dev/null && shellcheck "$0"
SCRIPT_DIR="$(realpath "$(dirname "$0")")"
# shellcheck source=./env