-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinstall.sh
53 lines (41 loc) · 1.18 KB
/
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
48
49
50
51
52
53
#!/bin/sh
which python3 || {
echo "Python3 is missing. cobra cannot be installed"
exit 1
}
cd
mkdir -p sandbox/cobra || {
echo "Cannot create a sandbox location where cobra will be installed"
exit 1
}
echo "Creating a python virtualenv to install cobra without dirtying your system python install"
cd sandbox/cobra
python3 -m venv venv || {
echo "Cannot create a virtualenv"
echo
echo "On Debian/Ubuntu systems, you will need to install libpython-dev
echo " sudo apt-get install python3-venv"
exit 1
}
venv/bin/pip3 install --upgrade pip
venv/bin/pip3 install -U cobras || {
echo "cobra failed to install. You might be missing a C compiler to install hiredis"
echo "Install XCode, XCode developer tools, clang or gcc"
echo
echo "On Debian/Ubuntu systems, you will need to install libpython-dev
echo " sudo apt-get install python3-dev"
exit 1
}
venv/bin/cobra
echo
venv/bin/cobra --version
cat <<EOF
cobras is now installed in $PWD/venv/bin/cobra
You can create aliases with
alias cobra='$PWD/venv/bin/cobra'
alias bavarde='$PWD/venv/bin/bavarde'
or update your PATH
export PATH=$PWD/venv/bin:\$PATH
Come say hi with:
bavarde client
EOF