wip
This commit is contained in:
parent
3ec76a796e
commit
f218cf6450
1 changed files with 18 additions and 2 deletions
20
zellij.sh
20
zellij.sh
|
@ -25,7 +25,23 @@ generic() {
|
|||
echo "🔍 Checking latest release of $REPO..."
|
||||
latest_release=$(curl -s "https://api.github.com/repos/$REPO/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
|
||||
latest_version=${latest_release#v} # Remove 'v' prefix (e.g., v0.42.2 → 0.42.2)
|
||||
download_url="https://github.com/$REPO/releases/download/$latest_release/$BINARY_NAME-x86_64-unknown-linux-musl.tar.gz"
|
||||
|
||||
# Detect system architecture
|
||||
ARCH=$(uname -m)
|
||||
case "$ARCH" in
|
||||
x86_64)
|
||||
ARCH="x86_64"
|
||||
;;
|
||||
aarch64 | arm64)
|
||||
ARCH="aarch64"
|
||||
;;
|
||||
*)
|
||||
echo "❌ Unsupported architecture: $ARCH" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
download_url="https://github.com/$REPO/releases/download/$latest_release/$BINARY_NAME-$ARCH-unknown-linux-musl.tar.gz"
|
||||
|
||||
# Skip if already up-to-date
|
||||
if [[ "$current_version" == "$latest_version" ]]; then
|
||||
|
@ -34,7 +50,7 @@ generic() {
|
|||
fi
|
||||
|
||||
# Download and install
|
||||
echo "⬇️ Downloading $BINARY_NAME $latest_version..."
|
||||
echo "⬇️ Downloading $BINARY_NAME $latest_version for $ARCH..."
|
||||
curl -sL "$download_url" | tar -xz -C "$TMP_DIR"
|
||||
|
||||
echo "🛠️ Installing to $INSTALL_DIR..."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue