-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_myvim.sh
More file actions
executable file
·45 lines (40 loc) · 1.29 KB
/
Copy pathsetup_myvim.sh
File metadata and controls
executable file
·45 lines (40 loc) · 1.29 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
#!/bin/bash
MYVIM=`pwd`
OS=`uname -s`
if [ "$OS" != "Darwin" ] && [ "$OS" != "Linux" ]; then
echo "error: unsupported OS $OS"
exit 1
fi
cd $HOME
echo ""
echo -e "Install dependent software packages ...\n"
if [ "$OS" = "Darwin" ]; then
if [ "`which brew`" = "" ]; then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
if [ "`which git`" = "" ];then
brew install git > /dev/null
brew install macvim > /dev/null
fi
else #Some Linux version
if [ "`which apt-get`" != "" ]; then
sudo apt-get update > /dev/null
sudo apt-get -y install vim-gtk > /dev/null
sudo apt-get -y install git cscope ctags > /dev/null
elif [ "`which yum`" != "" ]; then
sudo yum -y install vim-gtk > /dev/null
sudo yum -y install git cscope ctags > /dev/null
elif [ "`which pacman`" != "" ]; then
sudo pacman -Sy
sudo pacman -S --needed vim-gtk > /dev/null
sudo pacman -S --needed git cscope ctags > /dev/null
else
echo "error: unknown package manerger"
exit 1
fi
fi
#VIM_URL="https://github.com/zhanwwan/myvim.git"
#git clone -q ${VIM_URL}
cp -rf $MYVIM/vimrc $HOME/.vimrc
tar xzvf $MYVIM/vim.tar.gz -C $HOME > /dev/null
echo "Setup finieshed!"