-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
executable file
·62 lines (54 loc) · 1.59 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
#!/bin/bash
# Copyright (C) 2010 by Rob Hasselbaum <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>
# This script builds and installs the software using CMake and GNU Make.
# Call it from within the top-level project directory.
#
# This script was adapted from the Fancy Tasks Plasmoid project by Michael D.
# http://www.kde-look.org/content/show.php?action=content&content=99737.
if [ ! -d build ]
then
mkdir build
fi
cd build
cmake ../ -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix`
make
if [ $? != 0 ]
then
echo
echo "An error occured during compilation!"
echo "Read the INSTALL file for help."
exit
fi
if [ ! `whoami` = "root" ]
then
echo
echo "Installation requires root privileges - Ctrl+C to cancel."
sudo make install
if [ $? != 0 ]
then
exit
fi
else
make install
fi
if [ `whoami` = "root" ]
then
exit
fi
kbuildsycoca4
echo
echo "You MUST restart Plasma before using the applet."
echo "Read the INSTALL file for details. Enjoy!"