~ubuntu-branches/ubuntu/maverick/backintime/maverick

« back to all changes in this revision

Viewing changes to backintime

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Wiltshire
  • Date: 2009-05-16 23:04:32 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090516230432-orrutvtufbtuxsc6
Tags: 0.9.24-1
* New upstream version (closes: #527447):
  - backintime is no longer aware of 'backintime-gnome' and 'backintime-kde4'
    (you need run 'backintime-gnome' for GNOME version and 'backintime-kde4'
    for KDE4 version)
  - fix a bug that crashes the program after taking a snapshot
* Update homepage field in debian/control (closes: #527595)
* Refactor packaging to fit new upstream build system (an almost entire 
  re-write of debian/rules)
* Make configure scripts use /bin/sh instead of /bin/bash (they don't use
  bash features)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
#    Back In Time
4
 
#    Copyright (C) 2008-2009 Oprea Dan
5
 
#
6
 
#    This program is free software; you can redistribute it and/or modify
7
 
#    it under the terms of the GNU General Public License as published by
8
 
#    the Free Software Foundation; either version 2 of the License, or
9
 
#    (at your option) any later version.
10
 
#
11
 
#    This program is distributed in the hope that it will be useful,
12
 
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
#    GNU General Public License for more details.
15
 
#
16
 
#    You should have received a copy of the GNU General Public License along
17
 
#    with this program; if not, write to the Free Software Foundation, Inc.,
18
 
#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
 
 
20
 
if [ -f backintime.py ]; then
21
 
        BACKINTIME_PATH="./"
22
 
        PYTHON_BACKINTIME_PATH=""
23
 
else
24
 
        BACKINTIME_PATH="/usr/bin/"
25
 
        PYTHON_BACKINTIME_PATH="/usr/share/backintime/"
26
 
fi
27
 
 
28
 
GUI="auto"
29
 
 
30
 
for arg in $*; do
31
 
        case $arg in
32
 
                --gnome) GUI="gnome";;
33
 
                --kde4)  GUI="kde4";;
34
 
                --kde3)  GUI="kde3";;
35
 
                --nogui) GUI="";;
36
 
        esac
37
 
done
38
 
 
39
 
#auto-detect GUI
40
 
if [ $GUI = "auto" ]; then
41
 
        if [ "$(pidof ksmserver)" ]; then
42
 
                KDE_VERSION=`ksmserver --version | grep KDE:`
43
 
                if [ "$(echo $KDE_VERSION | grep 'KDE: 4.')" ]; then
44
 
                        GUI="kde4"
45
 
                else
46
 
                        GUI="kde3"
47
 
                fi
48
 
        else
49
 
                GUI="gnome"
50
 
        fi
51
 
 
52
 
        echo "Autodetect GUI mode: $GUI"
53
 
fi
54
 
 
55
 
CMD="python ${PYTHON_BACKINTIME_PATH}backintime.py"
56
 
 
57
 
#check if the selected gui exists
58
 
if [ $GUI = "kde4" ]; then
59
 
#try: kde4, kde3, gnome
60
 
        if [ -f ${BACKINTIME_PATH}backintime-kde4 ]; then
61
 
                CMD="${BACKINTIME_PATH}backintime-kde4"
62
 
        elif [ -f ${BACKINTIME_PATH}backintime-kde3 ]; then
63
 
                CMD="${BACKINTIME_PATH}backintime-kde3"
64
 
        elif [ -f ${BACKINTIME_PATH}backintime-gnome ]; then
65
 
                CMD="${BACKINTIME_PATH}backintime-gnome"
66
 
        fi
67
 
elif [ $GUI = "kde3" ]; then
68
 
#try: kde3, kde4, gnome
69
 
        if [ -f ${BACKINTIME_PATH}backintime-kde3 ]; then
70
 
                CMD="${BACKINTIME_PATH}backintime-kde3"
71
 
        elif [ -f ${BACKINTIME_PATH}backintime-kde4 ]; then
72
 
                CMD="${BACKINTIME_PATH}backintime-kde4"
73
 
        elif [ -f ${BACKINTIME_PATH}backintime-gnome ]; then
74
 
                CMD="${BACKINTIME_PATH}backintime-gnome"
75
 
        fi
76
 
elif [ $GUI = "gnome" ]; then
77
 
#try: gnome, kde4, kde3
78
 
        if [ -f ${BACKINTIME_PATH}backintime-gnome ]; then
79
 
                CMD="${BACKINTIME_PATH}backintime-gnome"
80
 
        elif [ -f ${BACKINTIME_PATH}backintime-kde4 ]; then
81
 
                CMD="${BACKINTIME_PATH}backintime-kde4"
82
 
        elif [ -f ${BACKINTIME_PATH}backintime-kde3 ]; then
83
 
                CMD="${BACKINTIME_PATH}backintime-kde3"
84
 
        fi
85
 
fi
86
 
 
87
 
echo "CMD: $CMD"
88
 
$CMD $*
89