Created
September 28, 2024 15:59
-
-
Save brandonkal/ae83a5d13b24f66dc8cd3b3419532c83 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
dir="/tmp/zellij/bootstrap" | |
case $(uname -m) in | |
"x86_64"|"aarch64") | |
arch=$(uname -m) | |
;; | |
"arm64") | |
arch="aarch64" | |
;; | |
*) | |
echo "Unsupported cpu arch: $(uname -m)" | |
exit 2 | |
;; | |
esac | |
case $(uname -s) in | |
"Linux") | |
sys="unknown-linux-musl" | |
dir="/usr/local/bin" | |
;; | |
"Darwin") | |
sys="apple-darwin" | |
;; | |
*) | |
echo "Unsupported system: $(uname -s)" | |
exit 2 | |
;; | |
esac | |
mkdir -p "$dir" | |
url="https://github.com/zellij-org/zellij/releases/latest/download/zellij-$arch-$sys.tar.gz" | |
curl --location "$url" | sudo tar -C "$dir" -xz | |
if [[ $? -ne 0 ]] | |
then | |
echo | |
echo "Extracting binary failed, cannot install zellij :(" | |
echo "One probable cause is that a new release just happened and the binary is currently building." | |
echo "Maybe try again later? :)" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment