Mercurial > trustbridge
annotate packaging/linux-installer-uninstall.inc @ 1150:a72d59f8c3ea
Create uninstaller.
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Thu, 18 Sep 2014 13:27:57 +0200 |
parents | 1c9001db6ea2 |
children | c13ac2c9851d |
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 | 2 |
3 ###INCLUDE:linux-installer-uninstall.l10n-de | |
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 |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
34 deinstall_certs() |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
35 { |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
36 local cinst="${oldinstcfg[PREFIX]}/bin/cinst" |
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 |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
41 if [ "$certlist" ] ; then |
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 |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
48 else |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
49 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
|
50 fi |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
51 } |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
52 |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
53 deinstall_etc() |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
54 { |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
55 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
|
56 remove_cronjob |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
57 |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
58 # FIXME: delete all files created by the application. |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
59 local tbcfg_files=( "${instcfg_path}/TrustBridge.ini" |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
60 "${instcfg_path}/trustbridge-tray-starter.cfg" |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
61 "$instcfg_file" ) |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
62 |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
63 getxt "Removing certificate lists 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
|
64 rm_files "$instdata_path"/list-*.txt |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
65 |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
66 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
|
67 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
|
68 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
|
69 |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
70 getxt "Removing configuration files:\n" |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
71 rm_files "${tbcfg_files[@]}" |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
72 rm_empty_dirs "$instcfg_path" |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
73 |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
74 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
|
75 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
|
76 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
|
77 |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
78 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
|
79 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
|
80 } |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
81 |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
82 deinstall() |
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 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
|
85 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
|
86 yorn || exit 0 |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
87 deinstall_certs |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
88 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
|
89 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
|
90 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
|
91 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
|
92 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
|
93 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
|
94 done |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
95 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
|
96 |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
97 # images |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
98 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
|
99 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
|
100 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
|
101 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
|
102 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
|
103 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
|
104 fi |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
105 done |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
106 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
|
107 |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
108 # Javascript sources |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
109 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
|
110 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
|
111 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
|
112 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
|
113 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
|
114 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
|
115 fi |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
116 done |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
117 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
|
118 |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
119 # Static files |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
120 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
|
121 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
|
122 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
|
123 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
|
124 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
|
125 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
|
126 fi |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
127 done |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
128 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
|
129 |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
130 # 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
|
131 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
|
132 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
|
133 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
|
134 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
|
135 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
|
136 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
|
137 fi |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
138 done |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
139 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
|
140 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
|
141 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
|
142 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
|
143 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
|
144 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
|
145 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
|
146 done |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
147 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
|
148 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
|
149 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
|
150 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
|
151 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
|
152 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
|
153 deinstall_etc |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
154 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
|
155 else |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
156 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
|
157 fi |
1c9001db6ea2
Split up linux installer in to be able to create a uninstaller (TODO).
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
158 } |