[X2Go-Commits] [buildscripts] 09/14: bin/build-deb-package: change ${TEMP_CLEANUP} to lower-case variant and a bash array.

git-admin at x2go.org git-admin at x2go.org
Fri Apr 3 03:07:48 CEST 2015


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository buildscripts.

commit a03cc980a44958ad24a2c588ba651f1d994673e2
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Fri Apr 3 03:02:18 2015 +0200

    bin/build-deb-package: change ${TEMP_CLEANUP} to lower-case variant and a bash array.
---
 bin/build-deb-package |   12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/bin/build-deb-package b/bin/build-deb-package
index ae9e095..3480e90 100755
--- a/bin/build-deb-package
+++ b/bin/build-deb-package
@@ -46,7 +46,7 @@ test -f "${HOME}/.buildscripts/${PREFIX}.conf" && . "${HOME}/.buildscripts/${PRE
 : ${DEB_BUILD_FOR:="debian:${DEBIAN_DISTROS} ubuntu:${UBUNTU_DISTROS}"}
 
 # These parts are not user-serviceable.
-TEMP_CLEANUP=""
+typeset -ag temp_cleanup=""
 # End of non-user-serviceable part.
 
 set -ex
@@ -54,14 +54,8 @@ set -ex
 # Cleans up temporary directories and files.
 # RFC SHOULD be called by trap handlers.
 cleanup () {
-	typeset -a temp_cleanup_arr
-	typeset OLDIFS="${IFS}"
-	IFS=":"
-	read -a temp_cleanup_arr <<< "${TEMP_CLEANUP}"
-	IFS="${OLDIFS}"
-
 	typeset temp_dir=""
-	for temp_dir in "${temp_cleanup_arr[@]}"; do
+	for temp_dir in "${temp_cleanup[@]}"; do
 		if [ -d "${temp_dir}" ]; then
 			rm -Rf "${temp_dir}"
 		fi
@@ -234,7 +228,7 @@ build_packages() {
 				test -z "${CODENAMES}" || grep "${CODENAMES}" <<< "${line}" || break
 
 				TEMP_DIR="$(mktemp -d --tmpdir=${TEMP_BASE})"
-				TEMP_CLEANUP="${TEMP_CLEANUP}:${TEMP_DIR}"
+				temp_cleanup+=("${TEMP_DIR}")
 				mkdir -p -- "${TEMP_DIR}/${PROJECT}"
 				chmod 2770 -Rf -- "${TEMP_DIR}"
 

--
Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git


More information about the x2go-commits mailing list