From 62a2093f5f3e8a0a19869e36be1185135a6adc51 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 23 Jan 2020 11:12:03 +0100 Subject: [PATCH] Apply changes to generate_template.sh --- scripts/cosm/generate_template.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/scripts/cosm/generate_template.sh b/scripts/cosm/generate_template.sh index 3f31d3f1..b9550409 100755 --- a/scripts/cosm/generate_template.sh +++ b/scripts/cosm/generate_template.sh @@ -1,22 +1,23 @@ #!/bin/bash - set -o errexit -o nounset -o pipefail command -v shellcheck > /dev/null && shellcheck "$0" # Choose from https://hub.docker.com/r/cosmwasm/wasmd/tags +REPOSITORY="cosmwasm/wasmd" VERSION="manual" -CONTAINER_NAME="wasmd" -rm -rf ./template -mkdir ./template +SCRIPT_DIR="$(realpath "$(dirname "$0")")" + +rm -rf "$SCRIPT_DIR/template" +mkdir "$SCRIPT_DIR/template" # any any more addresses you want to fund in genesis below docker run --rm \ - -e PASSWORD=my-secret-password \ - --mount type=bind,source="$(pwd)/template",target=/root \ - "$CONTAINER_NAME:$VERSION" \ - ./setup.sh \ - cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6 + -e PASSWORD=my-secret-password \ + --mount type=bind,source="$SCRIPT_DIR/template",target=/root \ + "$REPOSITORY:$VERSION" \ + ./setup.sh \ + cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6 # this is created as root, let's make it ours -sudo chown -R "$(id -u):$(id -g)" ./template +sudo chown -R "$(id -u):$(id -g)" "$SCRIPT_DIR/template"