diff --git a/geth-poa/util/deploy_create2.sh b/geth-poa/util/deploy_create2.sh index eda40615ee79..197ff8b5f284 100755 --- a/geth-poa/util/deploy_create2.sh +++ b/geth-poa/util/deploy_create2.sh @@ -4,11 +4,13 @@ set -e -if [ -z "$1" ]; then - echo "Usage: $0 " +# Use the first command line argument, if provided. Otherwise, use the environment variable. +JSON_RPC="${1:-$JSON_RPC_URL}" + +if [ -z "$JSON_RPC" ]; then + echo "Usage: $0 or set the JSON_RPC_URL environment variable." exit 1 fi -JSON_RPC="$1" if ! [ -x "$(command -v curl)" ]; then echo "Curl must be installed to deploy the create2 proxy" >&2