Skip to content

Commit 78f8457

Browse files
authored
Merge pull request #2180 from wilzbach/sh-bash
Use standard bash if instead of the shorthand merged-on-behalf-of: Vladimir Panteleev <github@thecybershadow.net>
2 parents 5998d19 + dfc9ff3 commit 78f8457

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

posix.mak

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -576,14 +576,15 @@ $G/dlangspec.verbatim.txt : $G/dlangspec-consolidated.d $(DMD) verbatim.ddoc
576576
# Fetch the latest article from the official D blog
577577
################################################################################
578578

579-
$G/dblog_latest.ddoc:
579+
$G/dblog_latest.html:
580580
@echo "Receiving the latest DBlog article. Disable with DIFFABLE=1"
581-
curl -s --fail --retry 3 --retry-delay 5 http://blog.dlang.org > $(TMP)/blog.html
582-
@[ $? -eq 0 ] || (echo "Curl couldn't connect to the DBlog."; exit 1)
583-
cat $(TMP)/blog.html | grep -m1 'entry-title' | \
581+
curl -s --fail --retry 3 --retry-delay 5 http://blog.dlang.org -o $@
582+
583+
$G/dblog_latest.ddoc: $G/dblog_latest.html
584+
cat $< | grep -m1 'entry-title' | \
584585
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/' | \
585586
tr '|' '\n' > $@
586-
cat $(TMP)/blog.html | grep -m2 'entry-title' | tail -n1 | \
587+
cat $< | grep -m2 'entry-title' | tail -n1 | \
587588
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/' | \
588589
tr '|' '\n' > $(basename $@)2.ddoc
589590
rm $(TMP)/blog.html

0 commit comments

Comments
 (0)