update Dockerfile to match directories in the container for COPY, more appropriate file placement
This commit is contained in:
parent
d502fa5585
commit
105b70b2df
18
Dockerfile
18
Dockerfile
|
|
@ -1,18 +1,16 @@
|
|||
FROM debian:12-slim
|
||||
FROM debian:12
|
||||
|
||||
# Install wget and xmlstarlet, an optimized xml parser. Then clear apt cache
|
||||
RUN apt update && apt install -y --no-install-recommends \
|
||||
bash \
|
||||
wget \
|
||||
xmlstarlet \
|
||||
cron
|
||||
|
||||
RUN apt update && apt install -y --no-install-recommends bash wget xmlstarlet cron
|
||||
|
||||
# Copy channel id list to data directory, cleaner script to opt directory
|
||||
COPY xml_tv_ids.txt /data/
|
||||
COPY xml_cleaner.sh /opt/
|
||||
COPY channel_keep_list.txt /opt/channel_keep_list.txt
|
||||
COPY channels_translate.txt /opt/channels_translate.txt
|
||||
COPY tmpl.xsl /opt/tmpl.xsl
|
||||
COPY xml_cleaner_v3.sh /opt/xml_cleaner.sh
|
||||
|
||||
# Add the cron job
|
||||
RUN echo "0 3 * * * /opt/xml_cleaner.sh" > /etc/cron.d/cleaner-cron-job
|
||||
RUN echo "0 7 * * * /opt/xml_cleaner.sh" > /etc/cron.d/cleaner-cron-job
|
||||
RUN chmod 0644 /etc/cron.d/cleaner-cron-job
|
||||
|
||||
CMD ["cron", "-f"]
|
||||
4
tmpl.xsl
4
tmpl.xsl
|
|
@ -8,7 +8,7 @@
|
|||
<xsl:apply-templates select="@*|node()" />
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
0
|
||||
<!-- Special handling for programme -->
|
||||
<xsl:template match="programme">
|
||||
<xsl:copy>
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
select="node()[not(self::episode-num[@system='onscreen'])]" />
|
||||
|
||||
<!-- Add the onscreen one at the end if the numbers actually exist -->
|
||||
<xsl:if test="$s2 >e; 0 and $e2 >e; 0">
|
||||
<xsl:if test="$s2 >= 0 and $e2 >= 0">
|
||||
<episode-num system="onscreen">
|
||||
<xsl:value-of select="$onscreenValue"/>
|
||||
</episode-num>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
wget "ftp://uptele:JCtHc3mQ866QL8rd@ftp.tvmedia.ca/xmltv.xml" -O /data/xmltv.xml
|
||||
|
||||
id_list="/data/channel_keep_list.txt"
|
||||
id_list="/opt/channel_keep_list.txt"
|
||||
raw="/data/xmltv.xml"
|
||||
parse_output="/data/parsed_new_epg.xml"
|
||||
update_output="/data/updated_new_epg.xml"
|
||||
|
|
@ -37,7 +37,7 @@ while read LINE; do
|
|||
awk -v old="$OLD_CHANNEL_ID" -v new="$NEW_CHANNEL_ID" '{gsub(old, new); print}' /tmp/tmpxmltv.xml >> /tmp/newtmpxmltv.xml
|
||||
rm /tmp/tmpxmltv.xml
|
||||
mv /tmp/newtmpxmltv.xml /tmp/tmpxmltv.xml
|
||||
done < channels_translate.txt
|
||||
done < /opt/channels_translate.txt
|
||||
|
||||
mv /tmp/tmpxmltv.xml $update_output
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user