58 lines
2.2 KiB
Bash
58 lines
2.2 KiB
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
echo "Installing terminal tools..."
|
|
|
|
# Install superfile (terminal file manager)
|
|
echo "Installing superfile..."
|
|
if ! command -v spf >/dev/null 2>&1; then
|
|
curl -sL https://superfile.netlify.app/install.sh | bash
|
|
# Add to PATH if not already there
|
|
if ! echo "$PATH" | grep -q "$HOME/.local/bin"; then
|
|
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
|
|
export PATH="$HOME/.local/bin:$PATH"
|
|
fi
|
|
else
|
|
echo "superfile already installed"
|
|
fi
|
|
|
|
# Install lazygit (terminal git manager)
|
|
echo "Installing lazygit..."
|
|
if ! command -v lazygit >/dev/null 2>&1; then
|
|
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')
|
|
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
|
|
tar xf lazygit.tar.gz lazygit
|
|
# Install to user's local bin directory to avoid sudo
|
|
mkdir -p $HOME/.local/bin
|
|
cp lazygit $HOME/.local/bin/
|
|
chmod +x $HOME/.local/bin/lazygit
|
|
rm lazygit lazygit.tar.gz
|
|
else
|
|
echo "lazygit already installed"
|
|
fi
|
|
|
|
# Install lazydocker (terminal docker manager)
|
|
echo "Installing lazydocker..."
|
|
if ! command -v lazydocker >/dev/null 2>&1; then
|
|
curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash
|
|
else
|
|
echo "lazydocker already installed"
|
|
fi
|
|
|
|
# Install btop (better htop alternative for system monitoring)
|
|
echo "Installing btop..."
|
|
if ! command -v btop >/dev/null 2>&1; then
|
|
echo "Installing btop from GitHub releases..."
|
|
BTOP_VERSION=$(curl -s "https://api.github.com/repos/aristocratos/btop/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')
|
|
curl -Lo btop.tbz "https://github.com/aristocratos/btop/releases/latest/download/btop-x86_64-linux-musl.tbz"
|
|
tar -xjf btop.tbz
|
|
# Install to user's local bin directory to avoid sudo
|
|
mkdir -p $HOME/.local/bin
|
|
cp btop/bin/btop $HOME/.local/bin/
|
|
chmod +x $HOME/.local/bin/btop
|
|
rm -rf btop btop.tbz
|
|
else
|
|
echo "btop already installed"
|
|
fi
|
|
|
|
echo "Terminal tools installation completed successfully!" |