forked from seebk/LaTeXText
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·41 lines (33 loc) · 912 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
#!/bin/bash
DEPENDENCIES=true
GTK3=false
echo -n "Check if Python LXML is available... "
python -c "import lxml" 2> /dev/null
if [ $? -ne 0 ]; then
echo "NOT FOUND"
DEPENDENCIES=false
else
echo "OK"
fi
if [ "$DEPENDENCIES" = false ]; then
echo "ERROR: some required Python modules are missing."
exit
fi
echo -n "Check if PyGObject is available... "
python -c "import gi" 2> /dev/null
if [ $? -ne 0 ]; then
echo "NOT FOUND, installing standard extension GUI"
GTK3=false
else
GTK3=true
echo "OK"
fi
echo -n "Copying extension to ~/.config/inkscape/extensions/ ... "
cp extension/latextext.py ~/.config/inkscape/extensions/
if [ "$GTK3" = true ]; then
cp extension/latextext_gtk3.py ~/.config/inkscape/extensions/
cp extension/latextext_gtk3.inx ~/.config/inkscape/extensions/
else
cp extension/latextext.inx ~/.config/inkscape/extensions/
fi
echo "done"