aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-10-20 10:30:13 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-10-20 10:30:13 -0700
commit3b8ed31f0863a19d1da80f9b86ea7983d9f65369 (patch)
tree8f90c27e100efeb6445a8db46ed15816db38a35a /scripts/copy_buildsync.sh
parentUpdate copy_buildsync.sh script to support stages with other suffixes. (diff)
downloadreleng-3b8ed31f0863a19d1da80f9b86ea7983d9f65369.tar.gz
releng-3b8ed31f0863a19d1da80f9b86ea7983d9f65369.tar.bz2
releng-3b8ed31f0863a19d1da80f9b86ea7983d9f65369.zip
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>
Diffstat (limited to 'scripts/copy_buildsync.sh')
-rwxr-xr-xscripts/copy_buildsync.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/copy_buildsync.sh b/scripts/copy_buildsync.sh
index 30ae7216..3ef2e50a 100755
--- a/scripts/copy_buildsync.sh
+++ b/scripts/copy_buildsync.sh
@@ -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}"