-
Notifications
You must be signed in to change notification settings - Fork 6
/
setup.sh
executable file
·55 lines (47 loc) · 1.04 KB
/
setup.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
47
48
49
50
51
52
53
#!/bin/sh -e
# Install .bashrc
if grep 'scripts/.bashrc' ~/.bashrc
then
echo '[ok] .bashrc'
else
# Append rather than replace
echo '. ~/scripts/.bashrc' >> ~/.bashrc
echo 'Appended to .bashrc'
. ~/.bashrc
fi
# Sym link .vim dir
if [ -L ~/.vim ]; then
echo "[ok] .vim"
elif [ -e ~/.vim ]; then
echo "[bad] .vim exists!"
else
ln -s ~/scripts/.vim ~/.vim
echo "[ok] Created .vim/ sym link"
fi
# Sym link .vimrc
if [ -L ~/.vimrc ]; then
echo "[ok] .vimrc"
elif [ -e ~/.vimrc ]; then
echo "[bad] .vimrc exists!"
else
ln -s ~/scripts/.vimrc ~/.vimrc
echo "[ok] Created .vimrc sym link"
fi
# Sym link .gitconfig
if [ -L ~/.gitconfig ]; then
echo "[ok] .gitconfig"
elif [ -e ~/.gitconfig ]; then
echo "[bad] .gitconfig exists!"
else
ln -s ~/scripts/.gitconfig ~/.gitconfig
echo "[ok] Created ~/.gitconfig sym link"
fi
# Sym link .psqlrc
if [ -L ~/.psqlrc ]; then
echo "[ok] .psqlrc"
elif [ -e ~/.psqlrc ]; then
echo "[bad] .psqlrc exists!"
else
ln -s ~/scripts/.psqlrc ~/.psqlrc
echo "[ok] Created ~/.psqlrc sym link"
fi