-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·37 lines (29 loc) · 1.19 KB
/
setup.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
#!/usr/bin/env bash
# Script for setting up a working environment
# Install Xcode Command Line Tools
sudo xcode-select --install
# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
# Set up Homebrew environment and install packages
eval "$(/opt/homebrew/bin/brew shellenv)"
brew tap homebrew/bundle
brew bundle
# Install Prezto for ZSH
rm -rf ~/.zprezto ~/.zpreztor ~/.zlogin ~/.zlogout ~/.zpreztorc ~/.zprofile ~/.zshenv ~/.zshrc
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
# Link Prezto configuration files
shopt -s nullglob
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/*; do
if [[ $rcfile != *README.md ]]; then
ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile##*/}"
fi
done
# Link personal configuration files
rm -f $HOME/.wezterm.lua
ln -s $HOME/dotfiles/.wezterm.lua $HOME/.wezterm.lua
ln -s $HOME/dotfiles/.gitignore $HOME/.gitignore
ln -s $HOME/dotfiles/gitconfig $HOME/.gitconfig
rm -f "$HOME/.zshrc" && ln -s "$HOME/dotfiles/zshrc" "$HOME/.zshrc"
rm -f "$HOME/.zpreztorc" && ln -s "$HOME/dotfiles/zpreztorc" "$HOME/.zpreztorc"
# Change default shell to ZSH
chsh -s /bin/zsh