-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.sh
executable file
·46 lines (38 loc) · 1.13 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
#!/usr/bin/env bash
cd "$( dirname "$0" )"
git pull origin main
function bootstrap() {
# zsh
ln -sf "$(pwd)/.zshenv" "$HOME/.zshenv"
ln -sf "$(pwd)/.zshrc" "$HOME/.zshrc"
ln -sf "$(pwd)/.zsh" "$HOME/.zsh"
# git
ln -sf "$(pwd)/.gitconfig" "$HOME/.gitconfig"
ln -sf "$(pwd)/.gitignore_global" "$HOME/.gitignore_global"
ln -sf "$(pwd)/.git-template" "$HOME/.git-template"
# dev
ln -sf "$(pwd)/.ackrc" "$HOME/.ackrc"
ln -sf "$(pwd)/.agignore" "$HOME/.agignore"
ln -sf "$(pwd)/.tmux.conf" "$HOME/.tmux.conf"
ln -sf "$(pwd)/.xbindkeysrc" "$HOME/.xbindkeysrc"
ln -sf "$(pwd)/.Xresources" "$HOME/.Xresources"
ln -sf "$(pwd)/.Xmodmap" "$HOME/.Xmodmap"
ln -sf "$(pwd)/.urxvt" "$HOME/.urxvt"
# vim
ln -sf "$(pwd)/.vimrc" "$HOME/.vimrc"
mkdir -p ~/.vim/tmp
# Ruby
ln -sf "$(pwd)/.ruby-version" "$HOME/.ruby-version"
# Wezterm
ln -sf "$(pwd)/.wezterm.lua" "$HOME/.wezterm.lua"
}
if [ "$1" == "--force" -o "$1" == "-f" ]; then
bootstrap
else
read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
bootstrap
fi
fi
unset bootstrap