Apply changes to generate_template.sh

This commit is contained in:
Simon Warta
2020-01-23 11:56:29 +01:00
parent d08fa865c3
commit 62a2093f5f
+11 -10
View File
@@ -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"