-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·63 lines (52 loc) · 1.98 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
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
if [ $UID -ne 0 ];
then
echo "Please run this script as root"
exit
fi
echo "================= Sharada Braille Wrieter =======================
Sharada braille writer is a six key approach to producing
printmaterials. Letters f, d, s, j, k, l represent 1 2 3 4 5 6 of the
braille dots respectively. By pressing "f" and "s" together will
produce letter "k" and like."
echo "============ Checking and Installing dependencies ================"
apt-get install python-glade2 espeak python-espeak python-enchant espeak
echo "============ Checking and removing existing files ================"
if [ -d /usr/share/pyshared/sbw ];
then
rm -rf /usr/share/pyshared/sbw
echo "Removing existing Data...............Ok"
fi
if [ -d /usr/lib/python2.7/dist-packages/sbw ];
then
rm -rf /usr/lib/python2.7/dist-packages/sbw
echo "Removing existing source.............Ok"
fi
if [ -e /usr/bin/sharada-braille-writer ];
then
rm /usr/bin/sharada-braille-writer
echo "Removing bin ........................Ok"
fi
if [ -e /usr/share/applications/sharada-braille-writer.desktop ];
then
rm /usr/share/applications/sharada-braille-writer.desktop
echo "Removing icon .......................Ok"
fi
echo "==================== Copying new files ==========================="
echo "Creating sbw folder ................OK"
mkdir /usr/share/pyshared/sbw
echo "Copying dara ........................OK"
cp -r data /usr/share/pyshared/sbw/
echo "Copying ui xml's ....................OK"
cp -r ui /usr/share/pyshared/sbw/
echo "Copying source files ................OK"
cp -r sbw /usr/lib/python2.7/dist-packages/
echo "Copying starter .....................OK"
cp sharada-braille-writer /usr/bin/
echo "Copying icon ........................OK"
cp sharada-braille-writer.desktop /usr/share/applications/
ldconfig
touch /usr/lib/python2.7/dist-packages/sbw/__init__.py
chmod 555 /usr/share/pyshared/sbw/data/*
chmod 777 /usr/share/pyshared/sbw/data/abbreviations.txt
echo "============ Compleated==========================================="