From cd8f74d4a3541fce3029788bc995c89d266ec581 Mon Sep 17 00:00:00 2001 From: xf0r3m Date: Sat, 15 Jul 2023 16:10:23 +0200 Subject: [PATCH] =?utf8?q?Dodanie=20mo=C5=BCliwo=C5=9Bci=20instalacji=20ko?= =?utf8?q?nter=C3=B3w=20z=20niestandardowej=20listy=20-=20do=20test=C3=B3w?= =?utf8?q?=20-=20tworzenie=20kontener=C3=B3w,=20funkcja=20'idle-fetch-cont?= =?utf8?q?ainers',=20skrypt=20'idle.sh'?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- idle.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/idle.sh b/idle.sh index 1e490b9..a163278 100644 --- a/idle.sh +++ b/idle.sh @@ -84,7 +84,11 @@ function idle-fetch-containers() { } function mass-create-container() { - containerNameList=$(grep $@ $DATABASE | cut -d ";" -f 3 | awk '{printf $1" "}'); + if echo $1 | grep -q '\,'; then + containerNameList=$(echo $1 | sed 's/,/ /g'); + else + containerNameList=$(grep $@ $DATABASE | cut -d ";" -f 3 | awk '{printf $1" "}'); + fi for contName in $containerNameList; do create-container $contName; done @@ -102,6 +106,8 @@ function idle-fetch-containers() { mass-create-container $rpmGrepOpts; elif [ "$1" = "--other" ]; then mass-create-container $otherGrepOpts; + elif echo $1 | grep -q '\,'; then + mass-create-container $1; else contName=$1; create-container $contName; -- 2.39.5