Skip to content

Commit 1b989f1

Browse files
committed
update install script
1 parent cf65acd commit 1b989f1

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

tools/install.sh

+14-15
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
#!/bin/sh
2-
pyvenv=`which pyvenv`
32

4-
if ! [ -x $pyvenv ]
5-
then
6-
echo "Can't find a pyvenv binary"
7-
exit
8-
fi
3+
set -e
94

10-
py=`dirname $pyvenv`/python
5+
py=`which python3`
116

127
echo "Using $py"
138

@@ -20,25 +15,29 @@ cd $install_dir
2015
if ! [ -d "$install_dir/bin" ]
2116
then
2217
echo "Installing pyvenv using $pyvenv..."
23-
$pyvenv env
18+
$py -m venv .
2419
fi
2520

2621
! [ -d $bundles ] && mkdir -p $bundles
2722

28-
. $install_dir/env/bin/activate
23+
. $install_dir/bin/activate
24+
25+
pip=$install_dir/bin/pip
2926

3027
echo "Installing dependencies..."
31-
pip install -q ConfigObject argparse
28+
$pip install -q ConfigObject argparse
3229

3330
echo "Installing ranger..."
34-
pip install -q --src="$HOME/.vim/bundle/" \
35-
--install-option="--script-dir=$install_dir/bin" \
31+
$pip install -q --src="$HOME/.vim/bundle/" \
3632
-e "git+https://github.com/hut/ranger.git@master#egg=ranger"
3733

3834
echo "Installing oh-my-vim..."
39-
pip install -q --src="$HOME/.vim/bundle/" \
40-
--install-option="--script-dir=$install_dir/bin" \
41-
-e "git+https://github.com/gawel/oh-my-vim.git@master#egg=oh-my-vim"
35+
if [ -d $HOME/.vim/bundle/oh-my-vim ]; then
36+
$pip install -q -e "$HOME/.vim/bundle/oh-my-vim"
37+
else
38+
$pip install -q --src="$HOME/.vim/bundle/" \
39+
-e "git+https://github.com/gawel/oh-my-vim.git@master#egg=oh-my-vim"
40+
fi
4241

4342
$install_dir/bin/oh-my-vim version > /dev/null
4443
version=`$install_dir/bin/oh-my-vim version`

0 commit comments

Comments
 (0)