Skip to content

Commit a86ee32

Browse files
committed
Hard fail if the something with the generation of the DBlog macros went wrong and the DDoc macro files are empty
1 parent 38dbb75 commit a86ee32

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

posix.mak

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,9 +589,11 @@ $G/dblog_latest.ddoc: $G/dblog_latest.html
589589
cat $< | grep -m1 'entry-title' | \
590590
sed -E 's/^.*<a href="(.+)" rel="bookmark">([^<]+)<\/a>.*<time.*datetime="[^"]+">([^<]*)<\/time><time class="updated".*Author *<\/span><a [^>]+>([^<]+)<\/a>.*/DBLOG_LATEST_TITLE=\2|DBLOG_LATEST_LINK=\1|DBLOG_LATEST_DATE=\3|DBLOG_LATEST_AUTHOR=\4/' | \
591591
tr '|' '\n' > $@
592+
@if [ ! -s $@ ] ; then echo "$@ is empty. Please check the download"; rm -f $@; exit 1 ; fi
592593
cat $< | grep -m2 'entry-title' | tail -n1 | \
593594
sed -E 's/^.*<a href="(.+)" rel="bookmark">([^<]+)<\/a>.*<time.*datetime="[^"]+">([^<]*)<\/time><time class="updated".*Author *<\/span><a [^>]+>([^<]+)<\/a>.*/DBLOG_LATEST_TITLE2=\2|DBLOG_LATEST_LINK2=\1|DBLOG_LATEST_DATE2=\3|DBLOG_LATEST_AUTHOR2=\4/' | \
594595
tr '|' '\n' > $(basename $@)2.ddoc
596+
@if [ ! -s $(basename $@)2.ddoc ] ; then echo "$(basename $@)2.ddoc is empty. Please check the download"; rm -f $(basename $@)2.ddoc; exit 1 ; fi
595597

596598
$G/dblog_latest2.ddoc: $G/dblog_latest.ddoc
597599

0 commit comments

Comments
 (0)