File: install.sh

package info (click to toggle)
plasma-widget-adjustableclock 2.6.1-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 260 kB
  • sloc: cpp: 957; sh: 85; makefile: 2
file content (39 lines) | stat: -rwxr-xr-x 546 bytes parent folder | download
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
#!/bin/bash

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 "Check if you have installed all needed header files."
    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