-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·76 lines (60 loc) · 1.47 KB
/
setup.sh
File metadata and controls
executable file
·76 lines (60 loc) · 1.47 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
#!/usr/bin/env bash
if [ -L ~/.vimrc ]
then
rm ~/.vimrc
else
mv ~/.vimrc vimrc_bak_$(whoami)_$(date +%Y%m%d)
fi
mv ~/.tmux.conf tmux_conf_bak_$(whoami)_$(date +%Y%m%d)
mv ~/.tmux.conf.local tmux_conf_local_bak_$(whoami)_$(date +%Y%m%d)
mv ~/.bash_profile bash_profile_$(whoami)_$(date +%Y%m%d)
mv ~/.bashrc bash_rc_$(whoami)_$(date +%Y%m%d)
ln -s $(pwd)/vimrc ~/.vimrc
ln -s $(pwd)/tmux.conf ~/.tmux.conf
ln -s $(pwd)/tmux.conf.local ~/.tmux.conf.local
ln -s $(pwd)/wgetrc ~/.wgetrc
ln -s $(pwd)/gitconfig ~/.gitconfig
ln -s $(pwd)/agignore ~/.agignore
ln -s $(pwd)/bash_profile ~/.bash_profile
ln -s $(pwd)/bashrc ~/.bashrc
if ! [ -d ~/.undodir ]
then
mkdir ~/.undodir/
fi
if ! [ -d ~/bin ]
then
mkdir -p ~/bin/
fi
chmod a+x cpplint.py
cp cpplint.py ~/bin/
if ! [ -d ~/.vim/bundle/vundle ]
then
echo "install vundle";
mkdir -p ~/.vim/bundle/
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
fi
echo "install plugin";
vim +BundleInstall +BundleClean +qall
#echo "install command-t"
#(
# cd ~/.vim/bundle/Command-T/ruby/command-t;
# ruby2.0 extconf.rb;
# make
#)
which js-beautify
if (( $? != 0 ))
then
echo "install js-beautify";
echo "Enter root Passward"
sudo npm install -g js-beautify
fi
if ! [ -e ~/bin/ack ]
then
echo "install ack"
curl https://beyondgrep.com/ack-v3.4.0 > ~/bin/ack && chmod 0755 ~/bin/ack
fi
if ! [ -e ~/bin/cscope.sh ]
then
chmod a+x bin/cscope.sh
cp bin/cscope.sh ~/bin
fi