From 46897a04d32e2c011888b87a044e6e6ad16e3075 Mon Sep 17 00:00:00 2001 From: 0xOzgur <29779769+0xOzgur@users.noreply.github.com> Date: Fri, 21 Jun 2024 17:05:58 +0300 Subject: [PATCH] update qclient --- update/update.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/update/update.sh b/update/update.sh index 518920c..d808e0b 100644 --- a/update/update.sh +++ b/update/update.sh @@ -23,6 +23,41 @@ git branch -D release git pull git checkout release +# Determine the ExecStart line based on the architecture +ARCH=$(uname -m) +OS=$(uname -s) + +# Determine the node binary name based on the architecture and OS +if [ "$ARCH" = "x86_64" ]; then + if [ "$OS" = "Linux" ]; then + NODE_BINARY="node-$VERSION-linux-amd64" + GO_BINARY="go1.22.4.linux-amd64.tar.gz" + QCLIENT_BINARY="qclient-$VERSION-linux-amd64" + elif [ "$OS" = "Darwin" ]; then + NODE_BINARY="node-$VERSION-darwin-amd64" + GO_BINARY="go1.22.44.linux-amd64.tar.gz" + QCLIENT_BINARY="qclient-$VERSION-darwin-arm64" + fi +elif [ "$ARCH" = "aarch64" ]; then + if [ "$OS" = "Linux" ]; then + NODE_BINARY="node-$VERSION-linux-arm64" + GO_BINARY="go1.22.4.linux-arm64.tar.gz" + elif [ "$OS" = "Darwin" ]; then + NODE_BINARY="node-$VERSION-darwin-arm64" + GO_BINARY="go1.22.4.linux-arm64.tar.gz" + QCLIENT_BINARY="qclient-$VERSION-linux-arm64" + fi +fi + +# Step 4:Update qClient +echo "Updating qClient" +sleep 1 # Add a 1-second delay +cd ~/ceremonyclient/client +rm -f qclient +wget https://releases.quilibrium.com/$QCLIENT_BINARY +mv $QCLIENT_BINARY qclient +chmod +x qclient + # Get the current user's home directory HOME=$(eval echo ~$HOME_DIR)