Mercurial > trustbridge
comparison packaging/linux-installer.inc.in @ 1132:db43c9a62935
Fixed cleanup of temporary directories.
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Wed, 17 Sep 2014 13:13:11 +0200 |
parents | d619507d9e9f |
children | 54a6fa9e44cf |
comparison
equal
deleted
inserted
replaced
1120:9651fabca17d | 1132:db43c9a62935 |
---|---|
269 } | 269 } |
270 | 270 |
271 cleanup() | 271 cleanup() |
272 { | 272 { |
273 getxt "Cleaning up temporary stuff ...\n" | 273 getxt "Cleaning up temporary stuff ...\n" |
274 # remove temporary directories, | 274 |
275 # $lock_dir is generate by the shar | 275 # remove temporary directories: |
276 if [ -z "${lock_dir-}" ]; then | 276 local -a temp_dirs |
277 exit | 277 if [ "${lock_dir}" ]; then |
278 fi | 278 # $lock_dir is generate by the shar |
279 for dir in "${instcfg[PREFIX]}/$lock_dir" "$extra_bin_path" ; do | 279 temp_dirs+=("${instcfg[PREFIX]}/$lock_dir") |
280 fi | |
281 temp_dirs+=("$extra_bin_path") | |
282 | |
283 for dir in "${temp_dirs[@]}" ; do | |
280 [ -d "$dir" ] && | 284 [ -d "$dir" ] && |
281 rm -rf "$dir" | 285 rm -rf "$dir" |
282 done | 286 done |
283 } | 287 } |
284 | 288 |