Skip to content
Snippets Groups Projects
Commit 0c438da5 authored by Ethan Buchman's avatar Ethan Buchman
Browse files

little bash fixes

parent 82a86cdc
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ echo "registering $CHAIN_ID in the grand registry of marmot mayhem and marmalade
# lay the genesis
# if it exists, just overwrite the chain id
if [ ! -f $CHAIN_DIR/genesis.json ]; then
if [ ! -f "$CHAIN_DIR/genesis.json" ]; then
"Could not find genesis file in $CHAIN_DIR. Did you run `eris chains new $CHAIN_ID`?"
exit 1
fi
......@@ -22,9 +22,13 @@ echo $RES | grep "Incorrect"
if0Exit "$RES" "Error registering genesis with etcb_testnet"
echo $RES
echo "successfully registered genesis on etcb chain"
# register the seed/s
RES=`mintx name --pubkey=$PUBKEY --name="${CHAIN_ID}/seeds" --data="$NEW_P2P_SEEDS" --amt=10000 --fee=0 --sign --broadcast --chainID=$ETCB_CHAIN_ID --wait`
ifExit "$RES" "Error registering seeds with etcb_testnet"
echo $RES | grep "Incorrect"
if0Exit "$RES" "Error registering seeds with etcb_testnet"
echo $RES
echo "successfully registered seed on etcb chain"
#! /bin/bash
ifExit(){
if [ $? -ne 0 ]; then
if [[ $? != 0 ]]; then
echo "ifExit"
echo "$1"
for var in "$@"
......@@ -13,7 +13,7 @@ ifExit(){
}
if0Exit(){
if [ $? -e 0 ]; then
if [[ $? == 0 ]]; then
echo "if0Exit"
echo "$1"
for var in "$@"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment