File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -575,14 +575,15 @@ $G/dlangspec.verbatim.txt : $G/dlangspec-consolidated.d $(DMD) verbatim.ddoc
575
575
# Fetch the latest article from the official D blog
576
576
# ###############################################################################
577
577
578
- $G/dblog_latest.ddoc :
578
+ $G/dblog_latest.html :
579
579
@echo " Receiving the latest DBlog article. Disable with DIFFABLE=1"
580
- curl -s --fail --retry 3 --retry-delay 5 http://blog.dlang.org > $(TMP ) /blog.html
581
- @[ $? -eq 0 ] || (echo " Curl couldn't connect to the DBlog." ; exit 1)
582
- cat $(TMP ) /blog.html | grep -m1 ' entry-title' | \
580
+ curl -s --fail --retry 3 --retry-delay 5 http://blog.dlang.org -o $@
581
+
582
+ $G/dblog_latest.ddoc : $G/dblog_latest.html
583
+ cat $< | grep -m1 ' entry-title' | \
583
584
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/' | \
584
585
tr ' |' ' \n' > $@
585
- cat $( TMP ) /blog.html | grep -m2 ' entry-title' | tail -n1 | \
586
+ cat $< | grep -m2 ' entry-title' | tail -n1 | \
586
587
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/' | \
587
588
tr ' |' ' \n' > $(basename $@ ) 2.ddoc
588
589
rm $(TMP ) /blog.html
You can’t perform that action at this time.
0 commit comments