-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup
More file actions
executable file
·94 lines (76 loc) · 2.5 KB
/
setup
File metadata and controls
executable file
·94 lines (76 loc) · 2.5 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#! /bin/bash
################################################
#
# One click setup for developent environment
#
echo "**** Setting up Goran's Development Environment"
echo "**** Detecting Operating System"
#Detect OSTYPE, not needed at the moment
#if [[ "$OSTYPE" == "linux-gnu" ]]; then
# # ...
#elif [[ "$OSTYPE" == "darwin"* ]]; then
# # ...
#else
# # Must be windows vista
#fi
# Detect .vimrc path.
VIMRC=$HOME/.vimrc
NOW=$(date +"%Y_%m_%d")
THIS_PATH=$(pwd)
# VIM
#.vimrc
echo '>> Setting up VIM'
#Check if .vimrc is already a symbolic link
#Don't backup .vimrc otherwise
if ! [ -L ~/.vimrc ]; then
_file="/nas/backup_$NOW"
echo '> Backing $_file...'
mv ~/.vimrc ~/.vimrc.BAK_$NOW
fi
rm ~/.vimrc
echo '> Symlinking .vimrc to dotify'
ln -s $THIS_PATH/files/.vimrc ~/.vimrc
#.vim
if [ -d ~/.vim ]; then
echo '> Backing up ~/.vim'
mv ~/.vim ~/.vim.BAK_$NOW
fi
#echo '> Symlinking .vim direstory to dotify'
#ln -s $THIS_PATH/files/.vim ~/.vim
#echo '> Creating ~/.vim directory'
mkdir ~/.vim
#First setup neobundle
mkdir -p ~/.vim/autoload
mkdir -p ~/.vim/bundle
curl https://raw.githubusercontent.com/Shougo/neobundle.vim/master/bin/install.sh | sh
cp -rf ~/.vim/bundle/neobundle.vim/autoload/* ~/.vim/autoload/
#Install all bundles
#vi -N -u $VIMRC -c "try | NeoBundleInstall | NeoBundleUpdate | finally | qall! | endtry" \
# -U NONE -i NONE -V1 -e -s
##Silver searcher, Need to guard here OS X vs Ubuntu
#if ! [ `which ag` ]; then
# echo '> Installing silver searcher'
# #TODO asks for password, make it skip
if [[ "$OSTYPE" == "linux-gnu" ]]; then
git clone https://github.com/ggreer/the_silver_searcher /tmp/ag && cd /tmp/ag && ./build.sh && sudo make install
elif [[ "$OSTYPE" == "darwin"* ]]; then
brew install the_silver_searcher
else
echo 'Sorry your OS is not supported'
fi
#Xclip or pbcopy, Need to guard here OS X vs Ubuntu
#$XCLIP_OK=$(dpkg-query -W --showformat='${Status}\n' xclip | grep "install ok installed")
#if [ "" == "$XCLIP_OK" ]; then
## type foo >/dev/null 2>&1 || { echo >&2 "I require foo but it's not installed. Aborting."; exit 1; }
# echo '> Installing xclip'
# sudo apt-get install xclip
#fi
#NodeJS needed for syntactic plugin
#$NODEJS_OK=$(dpkg-query -W --showformat='${Status}\n' nodejs | grep "install ok installed")
#if [ "" == "$XCLIP_OK" ]; then
# echo '> Installing nodejs'
# sudo apt-get install nodejsc
# echo 'symlinking /usr/bin/nodejs to /usr/bin/node, Fix for jshint.vim plugin'
# sudo ln -s /usr/bin/nodejs /usr/bin/node
#fi
#END OF SCRIPT