commit:     4f22add4b0ea7a17d4c35e8051b8b3fffcbf1ce1
Author:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 29 16:58:33 2024 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Sun Dec 29 16:58:33 2024 +0000
URL:        https://gitweb.gentoo.org/proj/binhost.git/commit/?id=4f22add4

updater: arrayize lists of nspawn containers

Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 builders/jiji/binhost-update  |  4 ++--
 builders/milou/binhost-update | 18 +++++++++---------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/builders/jiji/binhost-update b/builders/jiji/binhost-update
index ee5a395..be68a2e 100755
--- a/builders/jiji/binhost-update
+++ b/builders/jiji/binhost-update
@@ -9,7 +9,7 @@ LOCKFILE="/root/.tmp-binhost-${_BINHOST_NAME}-lock"
 [email protected]
 [email protected]
 
-NSPAWN_NAMES="binhost-arm64-kde-23 binhost-arm64-gnome-23 
binhost-arm64-server-23"
+NSPAWN_NAMES=(binhost-arm64-kde-23 binhost-arm64-gnome-23 
binhost-arm64-server-23)
 
 UPLOAD_USER=arm64
 UPLOAD_KEY=/root/.ssh/id_ed25519
@@ -96,7 +96,7 @@ emerge --sync -q &>> ${TMPFILE}
 
 anyfail=0
 
-for n in ${NSPAWN_NAMES} ; do
+for n in "${NSPAWN_NAMES[@]}" ; do
        echo Machine ${n} &>> ${TMPFILE}
        echo &>> ${TMPFILE}
        cd /var/lib/machines/${n}/etc/binhost &>> ${TMPFILE}

diff --git a/builders/milou/binhost-update b/builders/milou/binhost-update
index e6306fe..0451c1e 100755
--- a/builders/milou/binhost-update
+++ b/builders/milou/binhost-update
@@ -9,24 +9,24 @@ LOCKFILE="/root/.tmp-binhost-${_BINHOST_NAME}-lock"
 [email protected]
 [email protected]
 
-NSPAWNS_x8664_23="
+NSPAWNS_x8664_23=(
        binhost-amd64-x86-64-kde-23
        binhost-amd64-x86-64-gnome-23
        binhost-amd64-x86-64-openrc-23
        binhost-amd64-x86-64-server-23
-"
+)
 
-NSPAWNS_x8664v3_23="
+NSPAWNS_x8664v3_23=(
        binhost-amd64-x86-64-v3-kde-23
        binhost-amd64-x86-64-v3-gnome-23
        binhost-amd64-x86-64-v3-openrc-23
        binhost-amd64-x86-64-v3-server-23
-"
+)
 
-NSPAWN_NAMES="
-       ${NSPAWNS_x8664_23}
-       ${NSPAWNS_x8664v3_23}
-"
+NSPAWN_NAMES=(
+       "${NSPAWNS_x8664_23[@]}"
+       "${NSPAWNS_x8664v3_23[@]}"
+)
 
 UPLOAD_USER=amd64
 UPLOAD_KEY=/root/.ssh/id_ed25519
@@ -117,7 +117,7 @@ exec {BASH_XTRACEFD}>> ${TMPFILE}
 set -x
 
 nspawn_command=(systemd-nspawn --bind /var/cache/distfiles --bind-ro 
/var/db/repos/gentoo --tmpfs=/var/tmp:mode=1777,size=${TMPFS_SIZE}g)
-for n in ${NSPAWN_NAMES} ; do
+for n in "${NSPAWN_NAMES[@]}" ; do
        machinedir=/var/lib/machines/${n}
        echo Machine ${n} &>> ${TMPFILE}
        echo &>> ${TMPFILE}

Reply via email to