portal: fetch with a Makefile
This commit is contained in:
parent
62c4351c8d
commit
e2a5b7279a
13
Makefile
13
Makefile
|
@ -220,18 +220,17 @@ build/%.pls : NOVALID:=true
|
|||
portal:
|
||||
mkdir $@
|
||||
|
||||
portal/fetch.sh : STYLE=xsl/portal2fetch.xsl
|
||||
portal/fetch.sh : NOINPUTVALID:=true
|
||||
portal/fetch.sh : NOVALID:=true
|
||||
portal/fetch.sh: content/portal-config.xml $(STYLE)
|
||||
portal/Makefile : STYLE=xsl/portal2fetch.xsl
|
||||
portal/Makefile : NOINPUTVALID:=true
|
||||
portal/Makefile : NOVALID:=true
|
||||
portal/Makefile: content/portal-config.xml $(STYLE)
|
||||
$(call xml_process)
|
||||
chmod a+x $@
|
||||
|
||||
portal/items.xml : STYLE=xsl/portal2items.xsl
|
||||
portal/items.xml : NOINPUTVALID:=true
|
||||
portal/items.xml : NOVALID:=true
|
||||
portal/items.xml: content/portal-config.xml $(STYLE) portal/fetch.sh news.xml
|
||||
( cd portal && ./fetch.sh )
|
||||
portal/items.xml: content/portal-config.xml $(STYLE) portal/Makefile news.xml
|
||||
$(MAKE) -C portal fetch
|
||||
$(call xml_process)
|
||||
|
||||
portal/items-sorted.xml : STYLE=xsl/portal-sort.xsl
|
||||
|
|
|
@ -5,14 +5,20 @@
|
|||
<xsl:output method="text" encoding="utf-8"/>
|
||||
|
||||
<xsl:template match="/config">
|
||||
<xsl:text>#!/bin/sh </xsl:text>
|
||||
<xsl:text>fetch:</xsl:text>
|
||||
<xsl:for-each select="*[@id]">
|
||||
<xsl:text> portal-</xsl:text>
|
||||
<xsl:value-of select="@id"/>
|
||||
<xsl:text>.xml</xsl:text>
|
||||
</xsl:for-each>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="*[@id]"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="/config/*">
|
||||
<xsl:text>wget -O portal-</xsl:text>
|
||||
<xsl:text>portal-</xsl:text>
|
||||
<xsl:value-of select="@id"/>
|
||||
<xsl:text>.xml --no-check-certificate '</xsl:text>
|
||||
<xsl:text>.xml: wget -O $@ --no-check-certificate '</xsl:text>
|
||||
<xsl:value-of select="string(.)"/>
|
||||
<xsl:text>' </xsl:text>
|
||||
</xsl:template>
|
||||
|
|
Loading…
Reference in New Issue