-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL.sh
executable file
·54 lines (41 loc) · 1.4 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
#!/usr/bin/env bash
mode=$1
# TODO - allow arg
# dotfiles
# ssh
# vim
# OR
#
# TODO - .vim/colors/jellybeans.vim is repo dir, not file --needs to be copied out and replace that name
# bash stuff
backup='';
case $SYS in
Darwin)
# on a new MBA install, vim doesnt work w/o this setup
sudo sudo mkdir -p /usr/include/python2.7
sudo ln -s /System/Library/Frameworks/Python.framework/Versions/Current/include/python2.7/pyconfig.h /usr/include/python2.7/pyconfig.h
;;
Linux)
backup='--backup=t';
;;
esac;
( cd bash && for f in bash*; do echo "$f -> $HOME/.$f"; cp ${backup} $f ~/.$f; done )
# ssh stuff
[ -x ~/.ssh ] || ( mkdir -m 0700 ~/.ssh);
if [ -r ssh/id.asc ] && [ `which gpg` ]; then
( cd ssh && gpg id.asc && tar -xf id && cp ${backup} id_rsa* ~/.ssh/ && rm id_rsa* id )
fi
cp ${backup} ssh/config ~/.ssh/
cp ${backup} git/gitconfig ~/.gitconfig
cp ${backup} screen/screenrc ~/.screenrc
cp ${backup} tmux/tmux.conf ~/.tmux.conf
cp ${backup} sql/psqlrc ~/.psqlrc
[ -d ~/.cpan/CPAN ] || (mkdir -p ~/.cpan/CPAN )
[ -f ~/.cpan/CPAN/MyConfig.pm ] || (cp cpan/MyConfig.pm ~/.cpan/CPAN/ )
# vim stuff
mkdir -p ~/.vim/{bundle,bundle-manual,backup}
cp -r vim/autoload ~/.vim/
cp ${backup} vim/bundles.vim ~/.vim/
cp vim/submodule_init.pl ~/.vim
( cd ~/.vim && perl submodule_init.pl )
( cd vim && for f in vimrc*; do cp ${backup} $f ~/.$f; done )