forked from telemenar/ctrlp-cmatcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·47 lines (41 loc) · 900 Bytes
/
install.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
#!/usr/bin/env sh
chkPython2()
{
cmd=$1
ret=$($cmd -V 2>&1)
case "$ret" in
"Python 2."*)
return 0
;;
*)
return 1
;;
esac
}
findPython2()
{
cmd_list="python python2 python27 python2.7 python26 python2.6"
for cmd in $cmd_list; do
if chkPython2 $cmd; then
found_python=$cmd
break
fi
done
if [ "$found_python" = "" ]; then
echo "cannot find python2 automatically" >&2
while true; do
read -p "please input your python 2 command: " cmd
if chkPython2 "$cmd"; then
found_python=$cmd
break
fi
echo "verify [$cmd] with -V failed" >&2
done
fi
echo $found_python
}
python=$(findPython2)
echo "find python2 -> $python"
cd autoload
$python setup.py build
cp build/lib*/fuzzycomt.so .