Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update install.sh #42

Merged
merged 1 commit into from
Feb 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,28 @@ trap cleanup EXIT

# Download URL based on OS and architecture
BINARY_NAME="arch-cli"
DOWNLOAD_BINARY_NAME="cli"
DOWNLOAD_BINARY_NAME="cli"

# Map uname architecture to our release architecture names
case "$ARCH" in
x86_64)
RELEASE_ARCH="x86_64-unknown-linux-gnu"
;;
aarch64)
RELEASE_ARCH="aarch64-apple-darwin"
aarch64|arm64)
if [ "$OS" = "darwin" ]; then
RELEASE_ARCH="aarch64-apple-darwin"
else
RELEASE_ARCH="aarch64-unknown-linux-gnu"
fi
;;
*)
echo "Unsupported architecture: $ARCH"
exit 1
;;
esac

DOWNLOAD_URL="https://github.com/Arch-Network/arch-node/releases/download/${VERSION}/${DOWNLOAD_BINARY_NAME}-${RELEASE_ARCH}"

echo "Downloading ${BINARY_NAME} version ${VERSION}..."
if ! curl -sSfL "$DOWNLOAD_URL" -o "$TMP_DIR/${BINARY_NAME}"; then
echo "Error: Failed to download binary"
Expand All @@ -65,4 +71,4 @@ if ! sudo chmod +x "$INSTALL_DIR/${BINARY_NAME}"; then
exit 1
fi

echo "${BINARY_NAME} ${VERSION} installed successfully to ${INSTALL_DIR}"
echo "${BINARY_NAME} ${VERSION} installed successfully to ${INSTALL_DIR}"