-
Notifications
You must be signed in to change notification settings - Fork 1
/
install
executable file
·51 lines (43 loc) · 1.12 KB
/
install
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
#!/bin/sh
has_warnings=0
dir=$PWD/`dirname $0`
echo ""
echo $'\033[0;33mINSTALLING DOTFILES\033[0m'
echo ""
if [ ! -h ~/.bash_profile ]; then
ln -s $dir/bash_profile ~/.bash_profile
echo "Created link to ~/.bash_profile"
else
has_warnings=1
echo $'\033[0;31mWARNING: ~/.bash_profile already exists\033[0m'
fi
if [ ! -h ~/.bashrc ]; then
ln -s $dir/bashrc ~/.bashrc
echo "Created link to ~/.bashrc"
else
has_warnings=1
echo $'\033[0;31mWARNING: ~/.bashrc already exists\033[0m'
fi
if [ ! -h ~/.inputrc ]; then
ln -s $dir/inputrc ~/.inputrc
echo "Created link to ~/.inputrc"
else
has_warnings=1
echo $'\033[0;31mWARNING: ~/.inputrc already exists\033[0m'
fi
if [ ! -h ~/.gitconfig ]; then
ln -s $dir/gitconfig ~/.gitconfig
echo "Created link to ~/.gitconfig"
else
has_warnings=1
echo $'\033[0;31mWARNING: ~/.gitconfig already exists\033[0m'
fi
if ((has_warnings==1)); then
echo ""
echo $'HINT:\tYou should remove or rename files with warnings'
echo $'\tand run this script again.'
else
echo ""
echo $'\033[0;32mINSTALLATION SUCCESSFULL\033[0m'
fi
echo ""