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:
|
portal:
|
||||||
mkdir $@
|
mkdir $@
|
||||||
|
|
||||||
portal/fetch.sh : STYLE=xsl/portal2fetch.xsl
|
portal/Makefile : STYLE=xsl/portal2fetch.xsl
|
||||||
portal/fetch.sh : NOINPUTVALID:=true
|
portal/Makefile : NOINPUTVALID:=true
|
||||||
portal/fetch.sh : NOVALID:=true
|
portal/Makefile : NOVALID:=true
|
||||||
portal/fetch.sh: content/portal-config.xml $(STYLE)
|
portal/Makefile: content/portal-config.xml $(STYLE)
|
||||||
$(call xml_process)
|
$(call xml_process)
|
||||||
chmod a+x $@
|
|
||||||
|
|
||||||
portal/items.xml : STYLE=xsl/portal2items.xsl
|
portal/items.xml : STYLE=xsl/portal2items.xsl
|
||||||
portal/items.xml : NOINPUTVALID:=true
|
portal/items.xml : NOINPUTVALID:=true
|
||||||
portal/items.xml : NOVALID:=true
|
portal/items.xml : NOVALID:=true
|
||||||
portal/items.xml: content/portal-config.xml $(STYLE) portal/fetch.sh news.xml
|
portal/items.xml: content/portal-config.xml $(STYLE) portal/Makefile news.xml
|
||||||
( cd portal && ./fetch.sh )
|
$(MAKE) -C portal fetch
|
||||||
$(call xml_process)
|
$(call xml_process)
|
||||||
|
|
||||||
portal/items-sorted.xml : STYLE=xsl/portal-sort.xsl
|
portal/items-sorted.xml : STYLE=xsl/portal-sort.xsl
|
||||||
|
|
|
@ -5,14 +5,20 @@
|
||||||
<xsl:output method="text" encoding="utf-8"/>
|
<xsl:output method="text" encoding="utf-8"/>
|
||||||
|
|
||||||
<xsl:template match="/config">
|
<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:apply-templates select="*[@id]"/>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="/config/*">
|
<xsl:template match="/config/*">
|
||||||
<xsl:text>wget -O portal-</xsl:text>
|
<xsl:text>portal-</xsl:text>
|
||||||
<xsl:value-of select="@id"/>
|
<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:value-of select="string(.)"/>
|
||||||
<xsl:text>' </xsl:text>
|
<xsl:text>' </xsl:text>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
Loading…
Reference in New Issue