forked from Selenium-H/Notification-Center
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL.sh
executable file
·93 lines (77 loc) · 1.72 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/bin/bash
#Version 4
#=========
# Default Installation Directory
installDir=~/.local/share/gnome-shell/extensions
# Extension Name and directory
extensionName=notification-center
extensionDir=$extensionName@Selenium-H
echo ""
if [ ! -z $1 ]
then
installDir=$1
fi
if [ ! -d $installDir ]
then
if [ -z $2 ]
then
echo $installDir" directory does not exist."
echo "Would you like to create the directory (y/n) ? "
read response
else
response=$2
fi
if [ $response == "y" ]
then
mkdir -p $installDir
if [ $? -eq 0 ]
then
echo " Directory Created "
else
echo " Error ! "
exit
fi
else
echo "Exiting ... ! "
exit
fi
fi
echo "Installing Extension "$extensionDir
echo "Installation Path "$installDir
echo ""
echo -ne "Removing any Older Version ... "
rm -rf $installDir"/"$extensionDir
echo "Done"
echo -ne "Copying New Version ... "
cp -rf $extensionDir $installDir
cp -rf schemas $installDir"/"$extensionDir
cp -rf locale $installDir"/"$extensionDir
echo "Done"
cd $installDir"/"$extensionDir
echo -ne "Compiling Schemas ... "
glib-compile-schemas schemas
echo "Done"
echo -ne "Creating Translations ... "
cd locale
status="Done"
for poFile in */
do
mkdir ${poFile}/LC_MESSAGES
msgfmt ${poFile}/$extensionName".po" -o ${poFile}/LC_MESSAGES/$extensionName".mo"
if [ $? != 0 ]; then
status="Error"
break
fi
done
if [ "$status" == "Done" ]; then
echo -e $status
echo ""
echo "All Done !"
else
echo ""
echo "Extension Installed, Translations not done."
fi
echo ""
echo "Restart GNOME Shell ( Alt + F2 , Press r , Press Enter )."
echo "Enable this extension using GNOME Tweak Tool."
echo ""