Skip to content

Commit

Permalink
modified localnet script
Browse files Browse the repository at this point in the history
  • Loading branch information
arnabghose997 committed Mar 18, 2023
1 parent 640625e commit 12f4a8a
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions localnet.sh → localnetsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,8 @@ ${BINARY} &> /dev/null

RET_VAL=$?
if [ ${RET_VAL} -ne 0 ]; then
# Check the current version of hid-noded running on testnet
echo "hid-noded binary is not installed in your system. Installing now......"
HIDNODE_TESTNET_VERSION=$(curl -s https://rpc.jagrat.hypersign.id/abci_info | jq -r .result.response.version)
echo -e "\nCurrent hid-noded version running on Testnet is $HIDNODE_TESTNET_VERSION. Installing binary of version $HIDNODE_TESTNET_VERSION"
VERSION=$(echo "$HIDNODE_TESTNET_VERSION" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
SANITISED_VERSION=$(echo "$HIDNODE_TESTNET_VERSION" | sed "s/.*$VERSION/$VERSION/")

# Download binary
mkdir tmp_hid_node && cd tmp_hid_node
FILENAME=hid-noded-$SANITISED_VERSION-linux-amd64.tar.gz
wget "https://github.com/hypersign-protocol/hid-node/releases/download/v$SANITISED_VERSION/$FILENAME"
tar -C $HOME/.local/bin/ -xzf $FILENAME
cd .. && rm -rf ./tmp_hid_node
echo "hid-noded binary is not installed in your system."
exit 1
fi

# Setting up config files
Expand Down

0 comments on commit 12f4a8a

Please sign in to comment.