-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·94 lines (81 loc) · 2.54 KB
/
install.sh
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
#!/bin/bash
set -e
set -x
echo "Checking for Homebrew..."
if ! command -v brew &>/dev/null; then
echo "Homebrew not found. Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "Adding Homebrew to PATH..."
echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
else
echo "Homebrew is already installed."
fi
echo "Updating Homebrew..."
brew update
echo "Installing required packages..."
brew install make cmake git \
gettext libtool autoconf automake pkg-config unzip \
openssl readline sqlite3 wget curl llvm ncurses \
xz libffi python3
echo "Installing common CLI tools..."
brew install zsh ripgrep tmux \
btop node npm rsync bat fzf jq \
tree pass atuin cloc watch direnv
echo "Installing desktop applications..."
brew install --cask visual-studio-code raycast \
flameshot
echo "Creating necessary directories..."
mkdir -p ~/build
mkdir -p ~/git
echo "Checking if Neovim is already installed..."
# Neovim from source
if ! [ -d $HOME/build/neovim ]; then
echo "Cloning Neovim..."
git clone https://github.com/neovim/neovim ~/build/neovim
cd ~/build/neovim/
echo "Building Neovim..."
make CMAKE_BUILD_TYPE=RelWithDebInfo
echo "Installing Neovim..."
sudo make install
else
echo "Neovim is already installed."
fi
echo "Setting up Mise-en-Place..."
if ! command -v ~/.local/bin/mise &>/dev/null; then
echo "Mise en Place is not installed. Installing now..."
curl https://mise.run | sh
echo "Configuring Mise en Place..."
echo 'eval "$(~/.local/bin/mise activate zsh)"' >> ~/.zshrc
else
echo "Mise en Place is already installed."
fi
echo "Setting up Python environment..."
# Python tools
if ! [ -d $HOME/.pyenv ]; then
echo "Installing Pyenv..."
curl https://pyenv.run | bash
else
echo "Pyenv is already installed."
fi
echo "Checking if Rust is installed..."
# Rust tools
if ! [ -x "$(command -v cargo)" ]; then
echo "Installing Rust..."
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
else
echo "Rust is already installed."
fi
echo "Installing 'uv' - Python package installer..."
# uv | python package installer
if ! command -v uv &> /dev/null ; then
echo "Installing uv..."
curl -LsSf https://astral.sh/uv/install.sh | sh
else
echo "uv is already installed."
fi
echo "Setting up Starship prompt"
if ! [ -x "/usr/local/bin/starship" ]; then
curl -sS https://starship.rs/install.sh | sh
echo 'eval "$(starship init zsh)"' >> ~/.zshrc
echo "Installation completed!"