-
Notifications
You must be signed in to change notification settings - Fork 9
/
mkvenv_ubuntu.sh
executable file
·61 lines (48 loc) · 1.47 KB
/
mkvenv_ubuntu.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
54
55
56
57
58
59
60
61
#!/usr/bin/env bash
version="0.8.3"
envdir="osenv"
if [ -d $envdir ]; then
read -p "The $envdir directory already exists, remove it? [y|n]" -n 1 -s remove
echo
if [ $remove == "y" ]; then
rm -rf $envdir
else
echo "Activate the virtualenv and execute outspline:"
echo " $ cd $envdir"
echo " $ ./bin/activate"
echo " $ ./bin/outspline --config ./outspline.conf"
echo
echo "Deactivate the virtualenv when done:"
echo " $ deactivate"
exit 1
fi
fi
if ! python2 -c "import wx" &> /dev/null; then
echo "Install wxPython for this distribution."
echo " # apt-get install python-wxgtk3.0"
exit 1
fi
if ! dpkg -s python-gobject &> /dev/null; then
echo "Install python-gobject to support notifications:"
echo " # apt-get install python-gobject"
read -p "Continue without notifications? [y|n]" -n 1 -s cont
echo
if [ $cont != "y" ]; then
exit 1
fi
fi
virtualenv --system-site-packages $envdir
cd $envdir
source ./bin/activate
package="http://downloads.sourceforge.net/project/outspline/main/outspline-$version.tar.bz2"
wget $package
tar xjf "outspline-$version.tar.bz2"
cd "outspline-$version"
../bin/python setup.py install --optimize=1
cd ..
# On the main system the icon cache may have to be refreshed
#gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor
# Also, without root rights, icons can't be installed in /usr/share/icons,
# therefore e.g. the tray icon doesn't appear
./bin/outspline --config ./outspline.conf
deactivate