changeset 1134:f1384bf9d4a4

Mergerd
author Sascha Wilde <wilde@intevation.de>
date Wed, 17 Sep 2014 15:01:19 +0200
parents 54a6fa9e44cf (diff) 521032de3a0a (current diff)
children cf154e1f687a
files packaging/linux-installer.inc.in
diffstat 1 files changed, 12 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/packaging/linux-installer.inc.in	Wed Sep 17 13:39:02 2014 +0200
+++ b/packaging/linux-installer.inc.in	Wed Sep 17 15:01:19 2014 +0200
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Um TrustBridge zu installieren:
 # 1. Prüfen Sie ob Sie dieser Datei genügend vertrauen, um ihr die Kontrolle
-#    über diesen Rechner zu übergeben. Beispielsweise durch Vergleich mit 
+#    über diesen Rechner zu übergeben. Beispielsweise durch Vergleich mit
 #    einer starken Prüfsumme aus einer zweiten, unabhängigen Quelle.
 # 2. Öffnen Sie eine Kommandozeile, z.B. klicken Sie auf das "Terminal"-Symbol.
 # 3. Wechseln Sie in das Verzeichnis, in welchem diese Datei gespeichert ist.
@@ -22,10 +22,10 @@
 # 3. Change your working directory to where this file is stored.
 #    For example type "cd ~/Desktop" on your command line.
 # 4. Start the installation on the command line, e.g. for the current user
-#    only by typing something like "bash TrustBridge-1.0.0-i386.sh". 
+#    only by typing something like "bash TrustBridge-1.0.0-i386.sh".
 #    Hint: If you press the tab-key after "Tr" it may complete the filename.
 #
-# N.B. We could not have used a .deb package, because the installation must 
+# N.B. We could not have used a .deb package, because the installation must
 # also work without without adminstrator priviledges.
 #
 #
@@ -262,12 +262,16 @@
 cleanup()
 {
   getxt "Cleaning up temporary stuff ...\n"
-  # remove temporary directories,
-  # $lock_dir is generate by the shar
-  if [ -z "${lock_dir-}" ]; then
-    exit
+
+  # remove temporary directories:
+  local -a temp_dirs
+  if [ "${lock_dir}" ]; then
+      # $lock_dir is generate by the shar
+      temp_dirs+=("${instcfg[PREFIX]}/$lock_dir")
   fi
-  for dir in "${instcfg[PREFIX]}/$lock_dir" "$extra_bin_path" ; do
+  temp_dirs+=("$extra_bin_path")
+
+  for dir in "${temp_dirs[@]}" ; do
     [ -d "$dir" ] &&
         rm -rf "$dir"
   done

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