annotate packaging/linux-uninstaller.inc @ 1310:60e481aa75ca

(issue152) Do not return CryptUIDlgViewContext's return value The return value is false if the user cancels the dialog. But as the certificate has been shown this is not really an error.
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 13 Oct 2014 14:13:05 +0200
parents d51ae656cfd6
children 77c9e35657ab
rev   line source
1150
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
1 #!/bin/bash
1165
d51ae656cfd6 Added copyright/license header [m13/issue101].
Sascha Wilde <wilde@intevation.de>
parents: 1150
diff changeset
2 # Copyright (C) 2014 by Bundesamt fΓΌr Sicherheit in der Informationstechnik
d51ae656cfd6 Added copyright/license header [m13/issue101].
Sascha Wilde <wilde@intevation.de>
parents: 1150
diff changeset
3 # Software engineering by Intevation GmbH
d51ae656cfd6 Added copyright/license header [m13/issue101].
Sascha Wilde <wilde@intevation.de>
parents: 1150
diff changeset
4 #
d51ae656cfd6 Added copyright/license header [m13/issue101].
Sascha Wilde <wilde@intevation.de>
parents: 1150
diff changeset
5 # This file is Free Software under the GNU GPL (v>=2)
d51ae656cfd6 Added copyright/license header [m13/issue101].
Sascha Wilde <wilde@intevation.de>
parents: 1150
diff changeset
6 # and comes with ABSOLUTELY NO WARRANTY!
d51ae656cfd6 Added copyright/license header [m13/issue101].
Sascha Wilde <wilde@intevation.de>
parents: 1150
diff changeset
7 # See LICENSE.txt for details.
d51ae656cfd6 Added copyright/license header [m13/issue101].
Sascha Wilde <wilde@intevation.de>
parents: 1150
diff changeset
8
1150
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
9 set -u
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
10
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
11 ###INCLUDE:linux-installer-common.inc
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
12 ###INCLUDE:linux-uninstaller.l10n-de
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
13
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
14 ###INCLUDE:linux-installer-uninstall.inc
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
15
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
16 DEINSTALL=1
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
17
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
18 usage()
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
19 {
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
20 getxt "Usage: %s [OPTION]...\n" "$ME"
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
21 getxt "Uninstall TrustBridge.\n\n"
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
22 getxt "Options:\n"
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
23 getxt " -s, --system do a system wide deinstallation\n"
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
24 getxt " --help display this help and exit\n"
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
25 getxt " --version output version information and exit\n"
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
26 exit $1
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
27 }
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
28
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
29 parse_args()
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
30 {
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
31 OPTS=`getopt \
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
32 -l help,system,version \
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
33 -o s -n "$ME" -- "$@"`
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
34 [ $? -eq 0 ] || usage 23
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
35
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
36 eval set -- "$OPTS"
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
37
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
38 while true ; do
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
39 case "$1" in
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
40 --system|-s)
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
41 SYSINST=1
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
42 shift 1
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
43 ;;
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
44 --help)
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
45 usage 0
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
46 ;;
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
47 --version)
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
48 version
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
49 ;;
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
50 --)
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
51 shift
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
52 break
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
53 ;;
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
54 esac
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
55 done
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
56 }
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
57
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
58 #======================================================================
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
59 # main()
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
60
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
61 parse_args "$@"
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
62 check_priv
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
63 init_vars
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
64 read_oldinstcfg
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
65
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
66 cat <<EOF
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
67 ------------------------------------------------------------------------
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
68
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
69 TrustBridge - Uninstaller
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
70 Version ${instcfg[VERSION]} - ${ARCH} (Testversion)
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
71
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
72 ------------------------------------------------------------------------
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
73 EOF
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
74
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
75 deinstall
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
76 exit 0

http://wald.intevation.org/projects/trustbridge/