annotate packaging/linux-installer-uninstall.inc @ 1307:2bacaec6e101

(perf) Use cached values to deterimine elevation.
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 13 Oct 2014 12:32:13 +0200
parents 014586ef8a84
children
rev   line source
1139
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
1 #-*-sh-*-
1150
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents: 1139
diff changeset
2
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents: 1139
diff changeset
3 ###INCLUDE:linux-installer-uninstall.l10n-de
a72d59f8c3ea Create uninstaller.
Sascha Wilde <wilde@intevation.de>
parents: 1139
diff changeset
4
1139
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
5 rm_empty_dirs()
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
6 {
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
7 # Args: $1 - DIRECTORY
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
8 #
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
9 # Recursively remove DIRECTORY and all it _parent_ directories as
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
10 # long as they are empty.
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
11 local directory="$1"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
12 while [ -d "$directory" -a -z "$(ls 2>/dev/null -A "$directory")" ] ; do
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
13 getxt "Deleting empty directory '%s' ...\n" "$directory"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
14 rmdir "$directory"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
15 directory=`dirname "$directory"`
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
16 done
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
17 }
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
18
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
19 rm_files()
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
20 {
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
21 for file in "$@" ; do
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
22 if [ -e "$file" ] ; then
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
23 getxt "Deleting '%s' ...\n" "$file"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
24 rm "$file"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
25 fi
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
26 done
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
27 }
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
28
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
29 remove_cronjob()
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
30 {
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
31 setup_cronjob deinstall
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
32 }
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
33
1178
59b3c22a404c (issue142) Only remove certificates if requested
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1176
diff changeset
34 deinstall_certs_and_config()
1139
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
35 {
1176
c8f698ca6355 (issue128) Rename cinst to trustbridge-certificate-installer
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1164
diff changeset
36 local cinst="${oldinstcfg[PREFIX]}/bin/trustbridge-certificate-installer"
1139
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
37 local certlist=`ls 2>/dev/null -1 ${instdata_path}/list-installed.txt`
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
38
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
39 getxt "Uninstalling certificates ...\n"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
40
1178
59b3c22a404c (issue142) Only remove certificates if requested
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1176
diff changeset
41 if [ -f "$certlist" ] ; then
1139
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
42 getxt "Using certificate list '%s'.\n" "$certlist"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
43 if [ -x "$cinst" ] ; then
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
44 "$cinst" "list=$certlist" "choices=uninstall"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
45 else
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
46 getxt >&2 "WARNING: can't execute %s for certificate deinstallation.\n" "$cinst"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
47 fi
1178
59b3c22a404c (issue142) Only remove certificates if requested
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1176
diff changeset
48 rm_files "$certlist"
1139
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
49 else
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
50 getxt "No certificate list found. Nothing to do.\n"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
51 fi
1178
59b3c22a404c (issue142) Only remove certificates if requested
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1176
diff changeset
52
1206
55c13de88b1e (issue133) Always use CFGPATH to deinstall configuration
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1178
diff changeset
53 rm_files "${CFGPATH}/TrustBridge.ini"
55c13de88b1e (issue133) Always use CFGPATH to deinstall configuration
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1178
diff changeset
54 rm_empty_dirs "${CFGPATH}"
1139
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
55 }
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
56
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
57 deinstall_etc()
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
58 {
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
59 getxt "Removing cron job ...\n"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
60 remove_cronjob
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
61
1178
59b3c22a404c (issue142) Only remove certificates if requested
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1176
diff changeset
62 getxt "Removing certificate lists from: %s:\n" "$instdata_path"
59b3c22a404c (issue142) Only remove certificates if requested
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1176
diff changeset
63 rm_files "$instdata_path"/list-2*.txt
59b3c22a404c (issue142) Only remove certificates if requested
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1176
diff changeset
64
1206
55c13de88b1e (issue133) Always use CFGPATH to deinstall configuration
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1178
diff changeset
65 local tbcfg_files=( "${CFGPATH}/trustbridge-tray-starter.cfg"
1139
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
66 "$instcfg_file" )
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
67
1178
59b3c22a404c (issue142) Only remove certificates if requested
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1176
diff changeset
68 getxt "Removing configuration files:\n"
59b3c22a404c (issue142) Only remove certificates if requested
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1176
diff changeset
69 rm_files "${tbcfg_files[@]}"
59b3c22a404c (issue142) Only remove certificates if requested
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1176
diff changeset
70 rm_empty_dirs "$instcfg_path"
1206
55c13de88b1e (issue133) Always use CFGPATH to deinstall configuration
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1178
diff changeset
71 rm_empty_dirs "${CFGPATH}"
1139
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
72
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
73 getxt "Removing PID file from: %s:\n" "$instdata_path"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
74 rm_files "$instdata_path"/*.pid
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
75 rm_empty_dirs "$instdata_path"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
76
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
77 getxt "Removing TrustBridge from autostart\n"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
78 rm_files "${autostart_path}/trustbridge.desktop"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
79 update-desktop-database 2>&1 || true
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
80
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
81 getxt "Removing TrustBridge from start menu\n"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
82 rm_files "${startmenu_path}/trustbridge.desktop"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
83 }
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
84
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
85 deinstall()
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
86 {
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
87 if [ "${oldinstcfg[PREFIX]}" ] ; then
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
88 getxt "Really deinstall TrustBridge from '%s'? [y/n]\n" "${oldinstcfg[PREFIX]}"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
89 yorn || exit 0
1178
59b3c22a404c (issue142) Only remove certificates if requested
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1176
diff changeset
90 local certlist=`ls 2>/dev/null -1 ${instdata_path}/list-installed.txt`
59b3c22a404c (issue142) Only remove certificates if requested
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1176
diff changeset
91 if [ -f "$certlist" ] ; then
59b3c22a404c (issue142) Only remove certificates if requested
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1176
diff changeset
92 getxt "Do you also want to remove the certificates installed by TrustBridge? [y/n]\n"
59b3c22a404c (issue142) Only remove certificates if requested
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1176
diff changeset
93 yorn && deinstall_certs_and_config
59b3c22a404c (issue142) Only remove certificates if requested
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1176
diff changeset
94 fi
1139
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
95 local deinstdir="${oldinstcfg[PREFIX]}/bin"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
96 getxt "Deinstalling from '%s'.\n" "${oldinstcfg[PREFIX]}"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
97 for file in $BINNAMES ; do
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
98 local path="${deinstdir}/$file"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
99 getxt "Deleting '%s' ...\n" "$path"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
100 rm "$path" || getxt >&2 "WARNING: Could not delete: '%s'!\n" "$path"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
101 done
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
102 rm_empty_dirs "$deinstdir"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
103
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
104 # images
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
105 deinstdir="${oldinstcfg[PREFIX]}/share/doc/trustbridge/_images"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
106 for file in $HELPNAMES_IMG; do
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
107 local path="${deinstdir}/$file"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
108 if [ -f "$path" ]; then
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
109 getxt "Deleting '%s' ...\n" "$path"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
110 rm "$path" || getxt >&2 "WARNING: Could not delete: '%s'!\n" "$path"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
111 fi
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
112 done
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
113 rm_empty_dirs "$deinstdir"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
114
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
115 # Javascript sources
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
116 deinstdir="${oldinstcfg[PREFIX]}/share/doc/trustbridge/_sources"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
117 for file in $HELPNAMES_SOURCES; do
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
118 local path="${deinstdir}/$file"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
119 if [ -f "$path" ]; then
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
120 getxt "Deleting '%s' ...\n" "$path"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
121 rm "$path" || getxt >&2 "WARNING: Could not delete: '%s'!\n" "$path"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
122 fi
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
123 done
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
124 rm_empty_dirs "$deinstdir"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
125
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
126 # Static files
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
127 deinstdir="${oldinstcfg[PREFIX]}/share/doc/trustbridge/_static"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
128 for file in $HELPNAMES_STATIC; do
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
129 local path="${deinstdir}/$file"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
130 if [ -f "$path" ]; then
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
131 getxt "Deleting '%s' ...\n" "$path"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
132 rm "$path" || getxt >&2 "WARNING: Could not delete: '%s'!\n" "$path"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
133 fi
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
134 done
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
135 rm_empty_dirs "$deinstdir"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
136
1249
014586ef8a84 (issue68) Package licenses
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1206
diff changeset
137 # Licenses
014586ef8a84 (issue68) Package licenses
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1206
diff changeset
138 deinstdir="${oldinstcfg[PREFIX]}/share/doc/trustbridge/licenses"
014586ef8a84 (issue68) Package licenses
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1206
diff changeset
139 for file in $LICENSENAMES; do
014586ef8a84 (issue68) Package licenses
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1206
diff changeset
140 local path="${deinstdir}/$file"
014586ef8a84 (issue68) Package licenses
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1206
diff changeset
141 if [ -f "$path" ]; then
014586ef8a84 (issue68) Package licenses
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1206
diff changeset
142 getxt "Deleting '%s' ...\n" "$path"
014586ef8a84 (issue68) Package licenses
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1206
diff changeset
143 rm "$path" || getxt >&2 "WARNING: Could not delete: '%s'!\n" "$path"
014586ef8a84 (issue68) Package licenses
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1206
diff changeset
144 fi
014586ef8a84 (issue68) Package licenses
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1206
diff changeset
145 done
014586ef8a84 (issue68) Package licenses
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1206
diff changeset
146 rm_empty_dirs "$deinstdir"
014586ef8a84 (issue68) Package licenses
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1206
diff changeset
147
1139
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
148 # The actual html
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
149 deinstdir="${oldinstcfg[PREFIX]}/share/doc/trustbridge"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
150 for file in $HELPNAMES; do
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
151 local path="${deinstdir}/$file"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
152 if [ -f "$path" ]; then
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
153 getxt "Deleting '%s' ...\n" "$path"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
154 rm "$path" || getxt >&2 "WARNING: Could not delete: '%s'!\n" "$path"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
155 fi
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
156 done
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
157 rm_empty_dirs "$deinstdir"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
158 deinstdir="${oldinstcfg[PREFIX]}/share/pixmaps/trustbridge"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
159 getxt "Deinstalling from '%s'.\n" "${oldinstcfg[PREFIX]}"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
160 for file in $ICONNAME; do
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
161 local path="${deinstdir}/$file"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
162 getxt "Deleting '%s' ...\n" "$path"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
163 rm "$path" || getxt >&2 "WARNING: Could not delete: '%s'!\n" "$path"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
164 done
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
165 deinstdir="${oldinstcfg[PREFIX]}/share/pixmaps/trustbridge"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
166 rm_empty_dirs "$deinstdir"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
167 deinstdir="${oldinstcfg[PREFIX]}/share/pixmaps"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
168 rm_empty_dirs "$deinstdir"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
169 deinstdir="${oldinstcfg[PREFIX]}/share"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
170 rm_empty_dirs "$deinstdir"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
171 deinstall_etc
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
172 getxt "Deinstallation finished.\n"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
173 else
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
174 getxt "No current installation found! No harm done.\n"
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
175 fi
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
176 }

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