From 55afab878df8cfead43ac4b19e5958ee52737627 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Thu, 16 Jan 2020 12:26:37 +1000 Subject: [PATCH] Resolve shellcheck SC2129 use {...} >> file SC2129: Consider using { cmd1; cmd2; } >> file instead of individual redirects. Signed-off-by: Thanh Ha Change-Id: Ib7327c9f5867379654ada6b89d415321fe9fc89a Signed-off-by: Anil Belur --- shell/jenkins-configure-clouds.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/shell/jenkins-configure-clouds.sh b/shell/jenkins-configure-clouds.sh index 20092adb..8f7b3a85 100644 --- a/shell/jenkins-configure-clouds.sh +++ b/shell/jenkins-configure-clouds.sh @@ -327,11 +327,14 @@ for silo in $silos; do mkdir -p "$(dirname "$insert_file")" rm -f "$insert_file" - echo "" >> "$insert_file" - echo "//////////////////////////////////////////////////" >> "$insert_file" - echo "// Cloud config for $(basename "$cloud")" >> "$insert_file" - echo "//////////////////////////////////////////////////" >> "$insert_file" - echo "" >> "$insert_file" + { + echo "" + echo "//////////////////////////////////////////////////" + echo "// Cloud config for $(basename "$cloud")" + echo "//////////////////////////////////////////////////" + echo "" + } >> "$insert_file" + echo "templates = []" >> "$insert_file" mapfile -t templates < <(find "$cfg_dir" -maxdepth 1 -not -type d -not -name "cloud.cfg") -- 2.16.6