_build/generate-badge.sh: Skip on emty file

This commit is contained in:
Daniel Rudolf 2016-01-14 16:33:42 +01:00
parent 9f0c7bde5d
commit f46d0b978c

View file

@ -36,7 +36,7 @@ wget -O "$TMP_BADGE" \
"https://img.shields.io/badge/$BADGE_SUBJECT-$BADGE_STATUS-$BADGE_COLOR.svg"
# validate badge
if [ ! -f "$TMP_BADGE" ]; then
if [ ! -f "$TMP_BADGE" ] || [ ! -s "$TMP_BADGE" ]; then
printf 'Unable to generate badge; skipping...\n\n'
exit 0
fi