Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Commit

Permalink
delete workfile later
Browse files Browse the repository at this point in the history
Prevent the Workfile file from being deleted early during the conversion, happen by large files >200 Channels 14Days
  • Loading branch information
DeBaschdi authored Jan 6, 2020
1 parent ee26e0c commit 507f7f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion swc/swc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -312,14 +312,16 @@ perl cid_json.pl > swc_cid.json && rm chlist

# CONVERT JSON INTO XML: EPG
printf "\rConverting EPG JSON file into XML format... "
perl epg_json2xml.pl > swisscom_epg 2>epg_warnings.txt && rm /tmp/epg_workfile 2> /dev/null
#perl epg_json2xml.pl > swisscom_epg 2>epg_warnings.txt && rm /tmp/epg_workfile 2> /dev/null
perl epg_json2xml.pl > swisscom_epg 2>epg_warnings.txt 2> /dev/null

# COMBINE: CHANNELS + EPG
printf "\rCreating EPG XMLTV file... "
cat swisscom_epg >> swisscom_channels && mv swisscom_channels swisscom && rm swisscom_epg
sed -i '1i<?xml version="1.0" encoding="UTF-8" ?>\n<\!-- EPG XMLTV FILE CREATED BY THE EASYEPG PROJECT - (c) 2019 Jan-Luca Neumann -->\n<tv>' swisscom
sed -i "s/<tv>/<\!-- created on $(date) -->\n&\n\n<!-- CHANNEL LIST -->\n/g" swisscom
sed -i '$s/.*/&\n\n<\/tv>/g' swisscom
rm /tmp/epg_workfile 2> /dev/null
mv swisscom swisscom.xml

# VALIDATING XML FILE
Expand Down

0 comments on commit 507f7f0

Please sign in to comment.