-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Derek/ora 1006 release allorad binaries (#81)
needed to make some updates to the build script, and then added an install script --------- Signed-off-by: Derek Anderson <derek@upshot.xyz>
- Loading branch information
Showing
3 changed files
with
65 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
|
||
# Define the application name | ||
APP_NAME="allorad" | ||
|
||
# Check for a version argument, otherwise set a default version | ||
VERSION=${1:-"v0.0.9"} | ||
|
||
# Define the base URL using the specified or default version | ||
BASE_URL="https://github.com/allora-network/allora-chain/releases/download/$VERSION" | ||
|
||
# Determine the operating system and architecture | ||
OS=$(uname -s | tr '[:upper:]' '[:lower:]') | ||
ARCH=$(uname -m) | ||
|
||
case $ARCH in | ||
x86_64) | ||
ARCH="amd64" | ||
;; | ||
arm64) | ||
ARCH="arm64" | ||
;; | ||
*) | ||
echo "Unsupported architecture: $ARCH" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
# Construct the download URL | ||
URL="${BASE_URL}/${APP_NAME}_${OS}_${ARCH}" | ||
|
||
# Define the target directory | ||
TARGET_DIR="$HOME/.local/bin" | ||
|
||
# Create the target directory if it doesn't exist | ||
mkdir -p "$TARGET_DIR" | ||
|
||
# Download the file to /tmp | ||
wget -O "/tmp/${APP_NAME}" "$URL" | ||
|
||
# Move the binary to the target directory | ||
mv "/tmp/${APP_NAME}" "$TARGET_DIR" | ||
|
||
# Change permissions to make it executable | ||
chmod +x "$TARGET_DIR/$APP_NAME" | ||
|
||
echo "Installation complete. The $APP_NAME is now available in $TARGET_DIR" | ||
echo "To make $APP_NAME available from any terminal session, add the following line to your .bashrc or .zshrc:" | ||
echo "export PATH=\"\$PATH:$TARGET_DIR\"" |