Skip to content

Instantly share code, notes, and snippets.

@iliion
Created January 26, 2024 15:33
Show Gist options
  • Save iliion/e165e65c7aec8fb2f6cb76dc9032be27 to your computer and use it in GitHub Desktop.
Save iliion/e165e65c7aec8fb2f6cb76dc9032be27 to your computer and use it in GitHub Desktop.
Install [Zellij](https://zellij.dev/) multiplexer
#!/bin/env bash
if [ "$EUID" -ne 0 ]; then
echo "Installing system-wide apps requires sudo privileges. Do you have any?"
exit 1
fi
# Create a temporary directory
temp_dir=$(mktemp -d)
# Clean up the temporary directory
cleanup() {
rm -rf "$temp_dir"
echo "Temporary directory deleted: $temp_dir"
}
# Register the cleanup function to be executed on script termination
trap cleanup EXIT
# Download and install zellij
cd $temp_dir
wget https://github.com/zellij-org/zellij/releases/download/v0.39.2/zellij-x86_64-unknown-linux-musl.tar.gz
tar -xvf zellij*.tar.gz
cp zellij /usr/local/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment