-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathprint-info.sh
executable file
·44 lines (36 loc) · 1.14 KB
/
print-info.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
#!/usr/bin/env bash
errcho(){ >&2 echo ">> ERROR: $@"; }
#
#function magentaEcho() {
# local text="$1"
# echo -en "\033[1;95m$text\033[0m"
#}
#
#function greenEcho() {
# local text="$1"
# echo -en "\033[1;32m$text\033[0m"
#}
function exitWithErrMsg() {
errcho "$1"
exit 1
}
GREEN="\033[1;32m"
MAGENTA="\033[1;95m"
RESET_COLOR="\033[0m"
POOL_NAME="$1"
INDYSCAN_ADDRESS_UI="$2"
INDYSCAN_ADDRESS_API="$3"
if [ -z "$POOL_NAME" ]; then
exitWithErrMsg "Missing argument! POOL_NAME is missing"
fi
if [ -z "$INDYSCAN_ADDRESS_UI" ]; then
exitWithErrMsg "Missing argument! INDYSCAN_ADDRESS_UI is missing"
fi
if [ -z "$INDYSCAN_ADDRESS_API" ]; then
exitWithErrMsg "Missing argument! INDYSCAN_ADDRESS_API is missing"
fi
echo -en "Use IndyScan UI: $GREEN$INDYSCAN_ADDRESS_UI$RESET_COLOR\n"
echo -en "Use IndyScan API: $GREEN$INDYSCAN_ADDRESS_API$RESET_COLOR\n"
echo -en "Indy Pool was provisioned locally by name: $GREEN$POOL_NAME$RESET_COLOR\n"
echo -en "You can connect via IndyCLI:$GREEN pool connect $POOL_NAME$RESET_COLOR\n"
echo -en "To print the genesis file, run this:$GREEN cat ~/.indy_client/pool/$POOL_NAME/$POOL_NAME.txn $RESET_COLOR\n"