comparison packaging/linux-uninstaller.inc @ 1150:a72d59f8c3ea

Create uninstaller.
author Sascha Wilde <wilde@intevation.de>
date Thu, 18 Sep 2014 13:27:57 +0200
parents
children d51ae656cfd6
comparison
equal deleted inserted replaced
1149:96ecd345c961 1150:a72d59f8c3ea
1 #!/bin/bash
2 set -u
3
4 ###INCLUDE:linux-installer-common.inc
5 ###INCLUDE:linux-uninstaller.l10n-de
6
7 ###INCLUDE:linux-installer-uninstall.inc
8
9 DEINSTALL=1
10
11 usage()
12 {
13 getxt "Usage: %s [OPTION]...\n" "$ME"
14 getxt "Uninstall TrustBridge.\n\n"
15 getxt "Options:\n"
16 getxt " -s, --system do a system wide deinstallation\n"
17 getxt " --help display this help and exit\n"
18 getxt " --version output version information and exit\n"
19 exit $1
20 }
21
22 parse_args()
23 {
24 OPTS=`getopt \
25 -l help,system,version \
26 -o s -n "$ME" -- "$@"`
27 [ $? -eq 0 ] || usage 23
28
29 eval set -- "$OPTS"
30
31 while true ; do
32 case "$1" in
33 --system|-s)
34 SYSINST=1
35 shift 1
36 ;;
37 --help)
38 usage 0
39 ;;
40 --version)
41 version
42 ;;
43 --)
44 shift
45 break
46 ;;
47 esac
48 done
49 }
50
51 #======================================================================
52 # main()
53
54 parse_args "$@"
55 check_priv
56 init_vars
57 read_oldinstcfg
58
59 cat <<EOF
60 ------------------------------------------------------------------------
61
62 TrustBridge - Uninstaller
63 Version ${instcfg[VERSION]} - ${ARCH} (Testversion)
64
65 ------------------------------------------------------------------------
66 EOF
67
68 deinstall
69 exit 0

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