-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·41 lines (31 loc) · 1.06 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
38
39
40
41
#!/usr/bin/env bash
echo "Setting up..."
mkdir -p "$HOME/.config"
mkdir -p "$HOME/src"
# Keep sudo priv until script is done
sudo -v
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
OS=$(uname -o)
if [ "$OS" = "Darwin" ]; then
# Set Mac OS Default
# Install Brew & Bundle Brewfile
source "$HOME/.dotfiles/macos/set-defaults.sh"
source "$HOME/.dotfiles/brew/setup.sh"
else
source "$HOME/.dotfiles/linux/setup.sh"
fi
source "$HOME/.dotfiles/git/setup.sh"
# Make ZSH the default shell environment
sudo chsh -s "$(which zsh)"
# Install Antidote
if [ ! -d "$HOME/.antidote" ]; then
git clone --depth=1 https://github.com/mattmc3/antidote.git "$HOME/.antidote"
fi
ln -sfn "$HOME/.dotfiles/zsh/.zsh_plugins.txt" "$HOME/.zsh_plugins.txt"
# Symlink dotfiles
ln -sfn "$HOME/.dotfiles/zsh/zshrc.zsh" "$HOME/.zshrc"
ln -sfn "$HOME/.dotfiles/zellij" "$HOME/.config/zellij"
ln -sfn "$HOME/.dotfiles/nvim" "$HOME/.config/nvim"
ln -sfn "$HOME/.dotfiles/alacritty" "$HOME/.config/alacritty"
ln -sfn "$HOME/.dotfiles/k9s" "$HOME/.config/k9s"
echo "Done"