Skip to content

Commit

Permalink
Export ACCOUNT_INJECTION_OPTION env variable properly
Browse files Browse the repository at this point in the history
  • Loading branch information
platfowner committed Jan 9, 2022
1 parent 3a1ceaa commit 52a4b65
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
14 changes: 10 additions & 4 deletions start_node_genesis_gcp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ printf "\n[[[[[ start_node_genesis_gcp.sh ]]]]]\n\n"
function parse_options() {
local option="$1"
if [[ $option = '--private-key' ]]; then
ACCOUNT_INJECTION_OPTION="private_key"
ACCOUNT_INJECTION_OPTION="$option"
elif [[ $option = '--keystore' ]]; then
ACCOUNT_INJECTION_OPTION="keystore"
ACCOUNT_INJECTION_OPTION="$option"
elif [[ $option = '--mnemonic' ]]; then
ACCOUNT_INJECTION_OPTION="mnemonic"
ACCOUNT_INJECTION_OPTION="$option"
elif [[ $option = '--keep-code' ]]; then
KEEP_CODE_OPTION="$option"
elif [[ $option = '--no-keep-code' ]]; then
Expand Down Expand Up @@ -95,7 +95,13 @@ if [[ "$ACCOUNT_INJECTION_OPTION" = "" ]]; then
return 1
fi

export ACCOUNT_INJECTION_OPTION="$ACCOUNT_INJECTION_OPTION"
if [[ $ACCOUNT_INJECTION_OPTION = "--keystore" ]]; then
export ACCOUNT_INJECTION_OPTION=keystore
elif [[ $ACCOUNT_INJECTION_OPTION = "--mnemonic" ]]; then
export ACCOUNT_INJECTION_OPTION=mnemonic
else
export ACCOUNT_INJECTION_OPTION=private_key
fi
if [[ $SYNC_MODE_OPTION = "--full-sync" ]]; then
export SYNC_MODE=full
else
Expand Down
14 changes: 10 additions & 4 deletions start_node_incremental_gcp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ printf "\n[[[[[ start_node_incremental_gcp.sh ]]]]]\n\n"
function parse_options() {
local option="$1"
if [[ $option = '--private-key' ]]; then
ACCOUNT_INJECTION_OPTION="private_key"
ACCOUNT_INJECTION_OPTION="$option"
elif [[ $option = '--keystore' ]]; then
ACCOUNT_INJECTION_OPTION="keystore"
ACCOUNT_INJECTION_OPTION="$option"
elif [[ $option = '--mnemonic' ]]; then
ACCOUNT_INJECTION_OPTION="mnemonic"
ACCOUNT_INJECTION_OPTION="$option"
elif [[ $option = '--keep-code' ]]; then
KEEP_CODE_OPTION="$option"
elif [[ $option = '--no-keep-code' ]]; then
Expand Down Expand Up @@ -226,7 +226,13 @@ if [[ "$ACCOUNT_INJECTION_OPTION" = "" ]]; then
return 1
fi

export ACCOUNT_INJECTION_OPTION="$ACCOUNT_INJECTION_OPTION"
if [[ $ACCOUNT_INJECTION_OPTION = "--keystore" ]]; then
export ACCOUNT_INJECTION_OPTION=keystore
elif [[ $ACCOUNT_INJECTION_OPTION = "--mnemonic" ]]; then
export ACCOUNT_INJECTION_OPTION=mnemonic
else
export ACCOUNT_INJECTION_OPTION=private_key
fi
if [[ $SYNC_MODE_OPTION = "--full-sync" ]]; then
export SYNC_MODE=full
else
Expand Down

0 comments on commit 52a4b65

Please sign in to comment.