Mercurial > trustbridge
changeset 1132:db43c9a62935
Fixed cleanup of temporary directories.
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Wed, 17 Sep 2014 13:13:11 +0200 |
parents | 9651fabca17d |
children | 54a6fa9e44cf |
files | packaging/linux-installer.inc.in |
diffstat | 1 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/packaging/linux-installer.inc.in Wed Sep 17 09:15:47 2014 +0200 +++ b/packaging/linux-installer.inc.in Wed Sep 17 13:13:11 2014 +0200 @@ -271,12 +271,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