-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·71 lines (56 loc) · 1.51 KB
/
install.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/sh
echo Installing Environment
if [ ! -f ~/.screenrc ]; then
echo Symlinking .screenrc
ln -s ${PWD}/screenrc ~/.screenrc
fi
if [ ! -f ~/.gitconfig ]; then
echo Symlinking .gitconfig
ln -s ${PWD}/gitconfig ~/.gitconfig
fi
if [ ! -f ~/.gituser ]; then
echo No .gituser found. Configure with:
read -p "name: " name
read -p "email: " email
echo "[user]" > ~/.gituser
echo "\tname = $name" >> ~/.gituser
echo "\temail = $email" >> ~/.gituser
fi
if [ ! -f ~/.gitignore_global ]; then
echo Symlinking .gitignore_global
ln -s ${PWD}/gitignore_global ~/.gitignore_global
fi
if [ ! -d ~/.oh-my-zsh ]; then
echo Installing oh-my-zsh
if which curl > /dev/null; then
curl -L http://install.ohmyz.sh | sh
elif which wget > /dev/null; then
wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
fi
fi
if [ ! -f ~/.zshrc ]; then
echo Symlinking .zshrc
ln -s ${PWD}/zshrc ~/.zshrc
fi
#if [ ! -f ~/.vimrc ]; then
# echo Symlinking .vimrc
# ln -s ${PWD}/vimrc ~/.vimrc
#fi
#if [ ! -d ~/.vim ]; then
# echo Symlinking .vim/
# ln -s ${PWD}/vim ~/.vim
#fi
if [[ $OSTYPE == linux-gnu* ]] ; then
# Linux special steps
echo "Linux Customizations"
elif [[ $OSTYPE == darwin* ]] ; then
# OSX special steps
echo "OSX Customizations"
# Fix OSX's Default Home/End keybindings
ln -s ${PWD}/kb/DefaultKeyBinding.dict ~/Library/KeyBindings
# Source the OSX setup script
source os/osx.sh
else
echo Unknown OSTYPE ${OSTYPE}
fi
echo Done!