-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
55 lines (42 loc) · 1.43 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
#!/bin/sh
# XDG
if [[ -z "$XDG_CONFIG_HOME" ]]; then
export XDG_CONFIG_HOME="$HOME/Library/Preferences"
fi
if [[ -z "$XDG_CACHE_HOME" ]]; then
export XDG_CACHE_HOME="$HOME/Library/Caches"
fi
if [[ -z "$XDG_DATA_HOME" ]]; then
export XDG_DATA_HOME="$HOME/Library/Application\ Support"
fi
if [[ -z "$XDG_STATE_HOME" ]]; then
export XDG_STATE_HOME="$HOME/Library/Application\ Support"
fi
if [[ -z "$XDG_DATA_DIRS" ]]; then
export XDG_DATA_DIRS="/usr/local/share:/usr/share"
fi
if [[ -z "$XDG_CONFIG_DIRS" ]]; then
export XDG_CONFIG_DIRS="/Library/Preferences"
else
export XDG_CONFIG_DIRS="/Library/Preferences:$XDG_CONFIG_DIRS"
fi
cd "$HOME" || exit
git clone https://github.com/mcchrish/dotfiles .dotfiles
cd .dotfiles || exit
if ! (command -v brew > /dev/null); then
echo "Installing brew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
echo "Install all programs..."
/usr/local/bin/brew bundle install
echo "Stowing config files..."
/usr/local/bin/stow --restow --no-folding git
/usr/local/bin/stow --restow --no-folding gnupg
/usr/local/bin/stow --restow --no-folding rg
/usr/local/bin/stow --restow --no-folding system
# /usr/local/bin/stow --restow --no-folding tmux
/usr/local/bin/stow --restow --no-folding wezterm
/usr/local/bin/stow --restow --no-folding kitty
/usr/local/bin/stow --restow --no-folding vim
/usr/local/bin/stow --restow --no-folding zsh
echo "Done. :)"