-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·50 lines (41 loc) · 1.92 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
#!/usr/bin/env zsh
# Define the path to the Brewfile
brewfile="$HOME/.dotfiles/Brewfile"
# Check if Homebrew is installed, and if not, install it
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)"
else
echo "Homebrew found. Updating and upgrading packages..."
brew update
brew upgrade
fi
# Make sure Brewfile exists
if [ ! -f "$brewfile" ]; then
echo "Brewfile not found at $brewfile."
exit 1
fi
# Install packages from the Brewfile
echo "Installing packages..."
brew bundle --file="$brewfile"
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
# Link configuration files from the dotfiles directory
echo "Linking configurations..."
mkdir -p "$HOME/.config/kitty"
ln -sf "$HOME/.dotfiles/kitty/kitty.conf" "$HOME/.config/kitty/kitty.conf"
ln -sf "$HOME/.dotfiles/kitty/macos-launch-services-cmdline" "$HOME/.config/kitty/"
ln -sf "$HOME/.dotfiles/nvim" "$HOME/.config/"
curl https://raw.githubusercontent.com/knubie/vim-kitty-navigator/master/pass_keys.py > "$HOME/.config/kitty/pass_keys.py"
curl https://raw.githubusercontent.com/knubie/vim-kitty-navigator/master/get_layout.py > "$HOME/.config/kitty/get_layout.py"
chmod +x $HOME/.config/kitty/{pass_keys,get_layout}.py
for file in "$HOME"/.dotfiles/.*; do
if [[ -f "$file" && "$(basename "$file")" != ".git" && "$(basename "$file")" != ".gitignore" ]]; then
ln -sf "$file" "$HOME/$(basename "$file")"
fi
done
echo "Installing dependencies..."
volta install node
cargo install sccache exa bat ripgrep fd-find
npm install -g typescript prettier prettier_d_slim eslint_d eslint neovim typescript-language-server emmet-ls
echo "Installation complete."