SC2129: Consider using { cmd1; cmd2; } >> file instead of
individual redirects.
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: Ib7327c9f5867379654ada6b89d415321fe9fc89a
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
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")