annotate packaging/linux-installer-uninstall.inc @ 1196:e978f655be34

Correctly rename the signed certificate installer again
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 22 Sep 2014 18:59:01 +0200
parents 59b3c22a404c
children 55c13de88b1e
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
59b3c22a404c (issue142) Only remove certificates if requested
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1176
diff changeset
53 rm_files "${instcfg_path}/TrustBridge.ini"
59b3c22a404c (issue142) Only remove certificates if requested
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1176
diff changeset
54 rm_empty_dirs "$instcfg_path"
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
59b3c22a404c (issue142) Only remove certificates if requested
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1176
diff changeset
65 local tbcfg_files=( "${instcfg_path}/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"
1139
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
71
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
72 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
73 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
74 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
75
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
76 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
77 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
78 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
79
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
80 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
81 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
82 }
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 deinstall()
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
85 {
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
86 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
87 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
88 yorn || exit 0
1178
59b3c22a404c (issue142) Only remove certificates if requested
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1176
diff changeset
89 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
90 if [ -f "$certlist" ] ; then
59b3c22a404c (issue142) Only remove certificates if requested
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1176
diff changeset
91 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
92 yorn && deinstall_certs_and_config
59b3c22a404c (issue142) Only remove certificates if requested
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1176
diff changeset
93 fi
1139
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
94 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
95 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
96 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
97 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
98 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
99 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
100 done
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
101 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
102
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
103 # images
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
104 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
105 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
106 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
107 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
108 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
109 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
110 fi
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
111 done
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
112 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
113
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
114 # Javascript sources
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
115 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
116 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
117 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
118 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
119 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
120 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
121 fi
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
122 done
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
123 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
124
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
125 # Static files
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
126 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
127 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
128 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
129 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
130 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
131 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
132 fi
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
133 done
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
134 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
135
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
136 # 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
137 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
138 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
139 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
140 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
141 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
142 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
143 fi
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
144 done
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
145 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
146 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
147 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
148 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
149 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
150 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
151 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
152 done
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
153 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
154 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
155 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
156 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
157 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
158 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
159 deinstall_etc
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
160 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
161 else
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
162 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
163 fi
1c9001db6ea2 Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
164 }

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