-
Notifications
You must be signed in to change notification settings - Fork 721
/
shelley-testnet.tmux1.sh
executable file
·66 lines (55 loc) · 1.54 KB
/
shelley-testnet.tmux1.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/env bash
# shellcheck disable=SC2154,SC2046
__COMMON_SRCROOT="$(realpath $(dirname "$0")/..)"
###
### INTERNAL PLUMBING, DO NOT RUN DIRECTLY
###
conf="$1"
topo="$2"
delegate="$3"
run_node_args() {
local id=$1
RUN_NODE_ARGS=(
--state "node-${id}"
--port "300${id}"
--config-name 'custom'
)
if test "${delegate}" = 'indexed'
then delegate=${id}
fi
if test -n "${delegate}"
then RUN_NODE_ARGS+=(
--delegate-id "${delegate}"
); fi
if test "${topo}" = 'indexed'
then RUN_NODE_ARGS+=(
--topology-name "custom"
--topology "configuration/defaults/${conf}/topology-node-${id}.json"
)
else
RUN_NODE_ARGS+=(
--topology-name "${topo}"
)
fi
RUN_NODE_ARGS+=(
--config "configuration/defaults/${conf}/config-${id}.yaml"
)
echo -n "${RUN_NODE_ARGS[@]}"
}
tmux split-window -h
tmux split-window -v
for i in 0 1 2
do tmux select-pane -t ${i}
tmux send-keys \
"__COMMON_SRCROOT=${__COMMON_SRCROOT};
DEFAULT_DEBUG=${DEFAULT_DEBUG};
DEFAULT_VERBOSE=${DEFAULT_VERBOSE};
DEFAULT_TRACE=${DEFAULT_TRACE};
. ${__COMMON_SRCROOT}/scripts/common.sh;
echo "========= shelley-testnet.tmux1.sh ========="
. ${__COMMON_SRCROOT}/scripts/lib-cli.sh;
. ${__COMMON_SRCROOT}/scripts/lib-node.sh;
run_node $(run_node_args ${i})" \
C-m
done
tmux select-pane -t 0