-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.sh
executable file
·46 lines (39 loc) · 1.06 KB
/
bootstrap.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
#!/bin/zsh
link_all () {
echo "Symlinking all dotfiles"
touch .aliases.local
touch .bash_profile.local
touch .bashrc.local
touch .exports.local
touch .functions.local
touch .gitconfig.local
touch .zprofile.local
touch .zshrc.local
for file in $( ls -A | grep -vE '\.sh|\.git$|\.vscode$|\.gitignore$|.*.md|LICENSE|.mac_os' ) ; do
# Silently ignore errors here because the files may already exist
ln -sv "$PWD/$file" "$HOME/${file}"
done
}
configure_mac() {
if [[ "$OSTYPE" == "darwin"* ]]; then
echo "Configuring for Mac"
./.mac_os
fi
}
configure_prezto() {
echo "Configuring Prezto"
if [[ ! -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
echo "Cloning Prezto"
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
fi
# setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
ln -sv "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done
}
link_all
./brew.sh
configure_mac
configure_prezto
verbose_resource=true && source ~/.zshrc
echo "Done :)"