-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·89 lines (74 loc) · 2.13 KB
/
setup.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/bash
OS=`uname`
HOME_BIN=~/bin
HOME_VIM=~/.vim
OH_MY_ZSH=~/.oh-my-zsh
OH_MY_ZSH_PLUGIN=$OH_MY_ZSH/custom/plugins
ZSH_SYNTAX_HIGHLIGHT_PLUGIN=$OH_MY_ZSH_PLUGIN/zsh-syntax-highlighting
AUTO_REPORT_LONGTASKS_PLUGIN=$OH_MY_ZSH_PLUGIN/auto-report-longtasks
VIM_BUNDLE=$HOME_VIM/bundle
VUNDLE_HOME=$VIM_BUNDLE/vundle
MEOWRC_HOME=~/.meowrc
MEOWRC_BIN=$MEOWRC_HOME/bin
MEOWRC_VIM=$MEOWRC_HOME/vim
SECRETS_HOME=~/.secrets
RC_ITEMS=".zshrc .vimrc .screenrc .gitconfig .gitignore_global .inputrc .tmux.conf"
mkdir -p $VIM_BUNDLE
if [ ! -d $VUNDLE_HOME ]; then
echo 'Installing vundle...'
git clone https://github.com/gmarik/vundle.git $VUNDLE_HOME
fi
if [ ! -d $OH_MY_ZSH ]; then
echo 'Installing oh-my-zsh...'
git clone https://github.com/robbyrussell/oh-my-zsh.git $OH_MY_ZSH
fi
ln -fs $MEOWRC_HOME/ykchen.zsh-theme $OH_MY_ZSH/themes/
mkdir -p $OH_MY_ZSH_PLUGIN
pushd $OH_MY_ZSH_PLUGIN
if [ ! -d $ZSH_SYNTAX_HIGHLIGHT_PLUGIN ]; then
echo 'Installing zsh-syntax-highlighting...'
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_SYNTAX_HIGHLIGHT_PLUGIN
else
echo 'Updating zsh-syntax-highlighting...'
pushd $ZSH_SYNTAX_HIGHLIGHT_PLUGIN
git pull origin master
popd
fi
popd
if [ ! -d $MEOWRC_HOME ]; then
echo 'Installing meowrc...'
git clone https://github.com/twolights/meowrc $MEOWRC_HOME
else
echo -n 'Updating meowrc...'
pushd $MEOWRC_HOME
git pull origin master
popd
fi
echo -n 'Linking zsh plugin: auto-report-longtasks...'
mkdir -p $AUTO_REPORT_LONGTASKS_PLUGIN
ln -fs $MEOWRC_HOME/auto-report-longtasks.plugin.zsh $AUTO_REPORT_LONGTASKS_PLUGIN/
echo 'done!'
echo -n "Linking rc's... "
for rc in $RC_ITEMS; do
ln -fs $MEOWRC_HOME/$rc ~/
done
echo 'done!'
mkdir -p $HOME_BIN/
echo -n "Linking scripts... "
for script in $MEOWRC_BIN/*; do
ln -fs $script $HOME_BIN/
done
echo 'done!'
echo -n "Linking vim directories... "
for d in $MEOWRC_VIM/*; do
ln -fs $d $HOME_VIM/
done
echo 'done!'
echo -n "Creating secrets directory... "
mkdir -p $SECRETS_HOME
chmod 700 $SECRETS_HOME
echo 'done!'
vim +'BundleInstall!' +qa
if [ $OS = 'Darwin' ]; then
brew install autojump
fi