-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-linux.sh
More file actions
executable file
·97 lines (84 loc) · 3.27 KB
/
install-linux.sh
File metadata and controls
executable file
·97 lines (84 loc) · 3.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/usr/bin/env bash
# Linux-specific installations for packages not in apt
# Run after apt packages are installed
#
# All user binaries install to ~/.local/bin for a unified PATH
set -e
echo "Installing Linux-specific packages..."
# Unified bin directory - all tools install here
LOCAL_BIN="$HOME/.local/bin"
mkdir -p "$LOCAL_BIN"
export PATH="$LOCAL_BIN:$PATH"
# Ensure unzip is installed (needed for fnm)
if ! command -v unzip &> /dev/null; then
echo "Installing unzip (required for fnm)..."
sudo apt install -y unzip
fi
# GitHub CLI
if ! command -v gh &> /dev/null; then
echo "Installing GitHub CLI..."
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install gh -y
fi
# Starship prompt
if ! command -v starship &> /dev/null; then
echo "Installing Starship..."
curl -sS https://starship.rs/install.sh | sh -s -- -y -b "$LOCAL_BIN"
fi
# fnm (Fast Node Manager)
if [ ! -f "$LOCAL_BIN/fnm" ]; then
echo "Installing fnm..."
curl -fsSL https://fnm.vercel.app/install | bash -s -- --install-dir "$LOCAL_BIN" --skip-shell
fi
# zoxide
if [ ! -f "$LOCAL_BIN/zoxide" ]; then
echo "Installing zoxide..."
curl -sSfL https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | sh -s -- --bin-dir "$LOCAL_BIN"
fi
# pnpm - install binary to ~/.local/bin, global packages to ~/.local/share/pnpm
if [ ! -f "$LOCAL_BIN/pnpm" ]; then
echo "Installing pnpm..."
export PNPM_HOME="$HOME/.local/share/pnpm"
mkdir -p "$PNPM_HOME"
curl -fsSL https://get.pnpm.io/install.sh | ENV="$HOME/.bashrc" SHELL="$(which bash)" bash -
# Copy actual pnpm binary to unified location (installer creates a wrapper script)
PNPM_EXE=$(find "$PNPM_HOME" -name "pnpm" -type f 2>/dev/null | head -1)
if [ -n "$PNPM_EXE" ] && [ -f "$PNPM_EXE" ]; then
cp "$PNPM_EXE" "$LOCAL_BIN/pnpm"
chmod +x "$LOCAL_BIN/pnpm"
fi
fi
# sesh (tmux session manager)
if [ ! -f "$LOCAL_BIN/sesh" ]; then
echo "Installing sesh..."
export GOBIN="$LOCAL_BIN"
if command -v go &> /dev/null; then
go install github.com/joshmedeski/sesh@latest
else
echo "Warning: Go not installed, skipping sesh. Install golang-go via apt first."
fi
fi
# Ghostty (if available for Linux)
if ! command -v ghostty &> /dev/null; then
echo "Note: Ghostty installation on Linux varies. Check https://ghostty.org for instructions."
fi
# Set fish as default shell
if command -v fish &> /dev/null; then
FISH_PATH=$(which fish)
CURRENT_SHELL=$(getent passwd "$USER" | cut -d: -f7)
if [ "$CURRENT_SHELL" != "$FISH_PATH" ]; then
echo "Setting fish as default shell..."
chsh -s "$FISH_PATH"
fi
fi
echo ""
echo "Linux installation complete!"
echo ""
echo "All binaries installed to: $LOCAL_BIN"
echo ""
echo "Manual steps you may need:"
echo " 1. Install Nerd Fonts: https://www.nerdfonts.com/"
echo " 2. Install Ghostty from source or package if available"