-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup
More file actions
executable file
·39 lines (27 loc) · 741 Bytes
/
setup
File metadata and controls
executable file
·39 lines (27 loc) · 741 Bytes
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
#!/usr/bin/env bash
# set -o errexit, exit when a command fails
# add || true to commands that you allow to fail
set -e
# set -o nounset, exit when script tries to use undeclared variables
set -u
# exit status of the last command that threw a non-zero exit code is returned
set -o pipefail
# set -o xtrace, trace what gets executed
[[ "${TRACE:-}" ]] && set -x
main () {
dir=$(pwd)
# git
ln -fs $dir/git/gitconfig ~/.gitconfig
# vim
ln -fs $dir/vim ~/.vim
ln -fs $dir/vim/vimrc ~/.vimrc
# tmux
ln -fs $dir/tmux/tmux.conf ~/.tmux.conf
ln -fs $dir/tmux/tmuxline.conf ~/.tmuxline.conf
# zsh
ln -fs $dir/zsh/zshrc ~/.zshrc
ln -fs $dir/curlrc ~/.curlrc
ln -fs $dir/tigrc ~/.tigrc
trap - EXIT
}
main "$@"