-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·41 lines (36 loc) · 1.2 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
#!/bin/sh
# https://github.com/NicolasCARPi/.dotfiles
# install sane env
headless=0
if [ "$1" = '--headless' ]; then
headless=1
fi
cd "$HOME"
# make the links
if [ ! -d "$HOME/.vim" ]; then
ln -sf "$HOME/.dotfiles/vim" "$HOME/.vim"
fi
if [ ! -d "$HOME/.zsh" ]; then
ln -sf .dotfiles/zsh "$HOME/.zsh"
fi
# zsh will not read $HOME/.zsh/zshrc
ln -sf "$HOME/.dotfiles/zsh/zshrc" "$HOME/.zshrc"
ln -sf "$HOME/.dotfiles/tmux.conf" "$HOME/.tmux.conf"
ln -sf "$HOME/.dotfiles/Xdefaults" "$HOME/.Xdefaults"
ln -sf "$HOME/.dotfiles/mailcap" "$HOME/.mailcap"
ln -sf "$HOME/.dotfiles/gitconfig" "$HOME/.gitconfig"
ln -sf "$HOME/.dotfiles/tmuxinator" "$HOME/.tmuxinator"
ln -sf "$HOME/.dotfiles/pystartup" "$HOME/.pystartup"
ln -sf "$HOME/.dotfiles/gemrc" "$HOME/.gemrc"
ln -sf "$HOME/.dotfiles/zprofile" "$HOME/.zprofile"
# config dir
mkdir -p "$HOME/.config"
if [ $headless -eq 0 ]; then
ln -sf "$HOME/.dotfiles/awesome" "$HOME/.config/awesome"
ln -sf "$HOME/.dotfiles/ncmpcpp" "$HOME/.config/ncmpcpp"
ln -sf "$HOME/.dotfiles/config/mpd" "$HOME/.config/mpd"
ln -sf "$HOME/.dotfiles/user-dirs.dir" "$HOME/.config/user-dirs.dir"
fi
# create dirs for vim
mkdir -p "$HOME/.vim/backup"
mkdir -p "$HOME/.vim/undodir"