Bail in the variant loop if the variant_path comes out empty, as seen in cron mail from the script.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
This commit is contained in:
Robin H. Johnson 2015-10-20 10:30:13 -07:00
parent 260f36c938
commit 3b8ed31f08
No known key found for this signature in database
GPG key ID: 19395F23C58826C4

View file

@ -94,6 +94,10 @@ for ARCH in $ARCHES; do
echo -n '' >"${tmpdir}"/.keep.${ARCH}.txt
for v in $variants ; do
variant_path=$(find 20* -iname "${v}-20*" \( -name "*${EXTENSIONS}" -o -iname '*.iso' \) -print | sed -e "s,.*/$a/autobuilds/,,g" | sort -k1,1 -t/ | tail -n1 )
if [ -z "${variant_path}" -o ! -e "${variant_path}" ]; then
echo "$ARCH: Variant ${v} is missing" 1>&2
continue
fi
size=$(stat --format=%s ${variant_path})
f="latest-${v}.txt"
echo -e "${header}" >"${f}"