-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·28 lines (21 loc) · 833 Bytes
/
Copy pathinstall.sh
File metadata and controls
executable file
·28 lines (21 loc) · 833 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
#!/bin/bash
echo "[*] Installing my .dotfiles"
set -e
function ensure_link {
if test -L "$HOME/$2"; then
echo "[-] Symbolic link already exist: $HOME/$2"
else
ln -s "$HOME/$1" "$HOME/$2"
echo "[-] Created symbolic link: $HOME/$2"
fi
test -L "$HOME/$2" || ln -s "$HOME/$1" "$HOME/$2"
}
test -d ~/.dotfiles || git clone https://github.com/netoxico/dotfiles.git ~/.dotfiles
ensure_link ".dotfiles/vim" ".vim"
ensure_link ".dotfiles/vim/vimrc" ".vimrc"
ensure_link ".dotfiles/vim/gvimrc" ".gvimrc"
ensure_link ".dotfiles/.gitexcludes" ".gitexcludes"
ensure_link ".dotfiles/.gitconfig" ".gitconfig"
ensure_link ".dotfiles/tmux/tmux.conf" ".tmux.conf"
ensure_link ".dotfiles/omf" ".config/omf"
echo "[*] Installation completed"