Created
August 9, 2023 10:48
-
-
Save BaksiLi/ea2f505fdbe42349a5225390264c1f40 to your computer and use it in GitHub Desktop.
Install Zellij (latest release) on Linux (incl. Ubuntu) and Darwin
This file contains hidden or 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
#!/bin/bash | |
# Get the architecture of the machine | |
arch=$(uname -m) | |
os=$(uname -s) | |
# Download the Zellij binary | |
if [ "$os" == "Darwin" ]; then | |
filename="zellij-${arch}-apple-darwin.tar.gz" | |
url="https://github.com/zellij-org/zellij/releases/latest/download/$filename" | |
echo "Downloading Zellij binary for macOS..." | |
curl -LO "$url" | |
else | |
if [ "$os" == "Linux" ]; then | |
filename="zellij-${arch}-unknown-linux-musl.tar.gz" | |
url="https://github.com/zellij-org/zellij/releases/latest/download/$filename" | |
echo "Downloading Zellij binary for Linux..." | |
curl -LO "$url" | |
else | |
echo "Unsupported OS: $os" | |
fi | |
fi | |
# Uncompress the Zellij binary | |
echo "Uncompressing Zellij binary..." | |
tar -xf "$filename" | |
# Move the Zellij binary to the /bin directory | |
echo "Moving Zellij binary to /bin directory..." | |
sudo mv "./zellij" /bin/zellij | |
# Remove the .tar.gz file | |
echo "Removing .tar.gz file..." | |
rm "$filename" | |
# Check if the Zellij binary exists | |
if [ -f "/bin/zellij" ]; then | |
echo "Zellij binary installed successfully!" | |
else | |
echo "Zellij binary not installed successfully!" | |
fi |
Great! Thaks!
Thank you, very helpful!
Thanks! 🤗
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!