-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
41 lines (35 loc) · 854 Bytes
/
Copy pathinstall.sh
File metadata and controls
41 lines (35 loc) · 854 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
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
echo "checking for requirements"
if [ ! -f `which git` ] && [ ! -f `which curl` ]
then
if [ -x /usr/bin/yum ]
then
echo "installing requiements..."
sudo yum install git-core curl
else
echo "could not install pre-requisites, please install them manually"
echo "required: git curl"
exit
fi
else
echo "requirements exist, proceeding to install phase..."
fi
if [ -d ~/.dotfiles ]
then
echo "updating dotfiles..."
cd ~/.dotfiles
git pull
else
echo "retrieving dotfiles..."
cd ~
git clone git://github.com/Laurelai/dotfiles.git .dotfiles
fi
echo "creating config directory..."
mkdir -p ~/.config
FILES=".vimrc .emacs .sbclrc .bashrc .profile .bash_aliases .vim .gitconfig .functions .byobu"
for i in $FILES; do
echo installing: ~/.dotfiles/$i ~/$i
rm -rf ~/$i
ln -s ~/.dotfiles/$i ~/$i
done
echo "installation complete"