#! /usr/bin/env bash set -e script_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")" src_dir="$(dirname "$script_dir")" cd "$src_dir" usage() { echo "Small script to initialize a client to a local and closed test network with a maximum of 9 nodes." echo echo "Usage: eval \`$0 \`" echo " where should be an integer between 1 and 9." } if [ $# -lt 1 ] || [ "$1" -le 0 ] || [ 10 -le "$1" ]; then usage exit 1 fi . "$script_dir/client_lib.inc.sh" init_sandboxed_client "$1" add_sandboxed_bootstrap_identities | sed -e 's/^/## /' 1>&2 cat </dev/null 2>&1 ; then tezos-client-reset; fi ; alias tezos-client="$client" ; alias tezos-activate-alpha="$client -block genesis activate protocol ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK with fitness 1 and key dictator" ; alias tezos-client-reset="rm -rf \"$client_dir\"; unalias tezos-client tezos-activate-alpha tezos-client-reset" ; trap tezos-client-reset EXIT ; EOF (cat | sed -e 's/^/## /') 1>&2 <