use @ogayot's better bash

Co-authored-by: Olivier Gayot <olivier.gayot@sigexec.com>
This commit is contained in:
Michael Hudson-Doyle 2022-11-11 14:43:54 +13:00
parent 5dafdb916d
commit 5971541beb
1 changed files with 4 additions and 4 deletions

View File

@ -25,14 +25,14 @@ validate () {
fi
if [ "${mode}" = "install" ]; then
cfgs=
cfgs=()
for stage in partitioning formatting; do
cfg="$tmpdir"/var/log/installer/curtin-install/subiquity-$stage.conf
if [ -e $cfg ]; then
cfgs="$cfgs $cfg"
if [ -e "$cfg" ]; then
cfgs+=("$cfg")
fi
done
python3 scripts/validate-yaml.py $cfgs
python3 scripts/validate-yaml.py "${cfgs[@]}"
if [ ! -e $tmpdir/subiquity-client-debug.log ] || [ ! -e $tmpdir/subiquity-server-debug.log ]; then
echo "log file not created"
exit 1