forked from mostlygeek/shell-stuff
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·100 lines (87 loc) · 1.95 KB
/
setup.sh
File metadata and controls
executable file
·100 lines (87 loc) · 1.95 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/bin/bash
cd `dirname $0`;
PWD=`pwd`;
# check for color awesomeness...
echo -n " - Check Terminal is xterm-256color: "
if [ $TERM != "xterm-256color" ]
then
echo "Fail, it is : $TERM"
else
echo "OK"
fi
# set screenrc file
echo -n " - Setting $HOME/.screenrc: "
if [ ! -e "$HOME/.screenrc" ]
then
ln -s "$PWD/screenrc" "$HOME/.screenrc"
echo "Done"
else
echo "Skip, already exists"
fi
# set dircolors
echo -n " - Setting $HOME/.dircolors: "
if [ ! -e "$HOME/.dircolors" ]
then
ln -s "$PWD/dircolors" "$HOME/.dircolors"
echo "Done"
else
echo "Skip, already exists"
fi
# set bashrc file
echo -n " - Setting $HOME/.bashrc: "
if [ ! -e "$HOME/.bashrc" ]
then
ln -s "$PWD/bashrc" "$HOME/.bashrc"
echo "Done"
else
echo "Skip, already exists"
fi
# set bash_profile file
echo -n " - Setting $HOME/.bash_profile: "
if [ ! -e "$HOME/.bash_profile" ]
then
ln -s "$PWD/bash_profile" "$HOME/.bash_profile"
echo "Done"
else
echo "Skip, already exists"
fi
# Create VIM Directories
echo -n " - Creating $HOME/.vim ... "
if [ ! -e "$HOME/.vim" ]
then
mkdir "$PWD/vimfiles/backup"
mkdir "$PWD/vimfiles/tmp"
ln -s "$PWD/vimfiles" "$HOME/.vim"
echo "Done"
else
echo "Skip, already exists"
fi
echo -n " - Creating $HOME/.vimrc ... "
if [ ! -e "$HOME/.vimrc" ]
then
ln -s "$PWD/nix_vimrc" "$HOME/.vimrc"
echo "Done"
else
echo "Skip, already exists"
fi
# git
echo -n " - Creating $HOME/.gitconfig ... "
if [ ! -e "$HOME/.gitconfig" ]
then
ln -s "$PWD/gitconfig" "$HOME/.gitconfig"
echo "Done"
else
echo "Skip, already exists"
fi
echo -n " - Creating $HOME/.git-completion ... "
if [ ! -e "$HOME/.git-completion.sh" ]
then
ln -s "$PWD/git-completion.sh" "$HOME/.git-completion.sh"
echo "Done"
else
echo "Skip, already exists"
fi
echo " - Creating template hook dir"
mkdir -p "$HOME/.git_template/hooks"
echo " - Copying template hooks"
cp -v $PWD/hooks/* "$HOME/.git_template/hooks"