From: Matija Nalis Date: Sat, 21 Nov 2020 01:42:05 +0000 (+0100) Subject: RSS cleanups X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/a156101e6b92c33e5523424277cdb36b7dd0a766 RSS cleanups --- diff --git a/cookbooks/planet/templates/default/planetdump.erb b/cookbooks/planet/templates/default/planetdump.erb index 88f4e6a3b..d367fe5d2 100644 --- a/cookbooks/planet/templates/default/planetdump.erb +++ b/cookbooks/planet/templates/default/planetdump.erb @@ -103,10 +103,10 @@ function mk_torrent { # Function to create RSS/Atom feed for .torrent files function mk_rss { - type="$1" # fixme "history" / "planet" - format="$2" # fixme "pbf" - web_dir="$3" # fixme "pbf/full-history" or "pbf" - disk_dir="$4" # fixme "/store/planet/pbf/full-history" + type="$1" + format="$2" + web_dir="$3" + disk_dir="$4" old_pwd="$PWD" rss_name="${type}-${format}-rss.xml" rss_path="${old_pwd}/${rss_name}" @@ -117,12 +117,12 @@ function mk_rss { # RSS header printf '%s\n' \ - '' \ - '' \ + '' \ + '' \ '' > "${rss_path}" cat >> "${rss_path}" <<__EOF - OpenStreetMap planet torrent RSS - ${rss_baseurl} + OpenStreetMap ${type} torrent RSS + ${rss_dirurl} RSS feed for ${type}.osm.${format}.torrent en-us @@ -134,20 +134,20 @@ __EOF do cat >> "${rss_path}" <<__EOF - $tf - ${rss_dirurl}/$tf - `date -R -r $tf` + ${tf} + ${rss_dirurl}/${tf} + `date -R -r ${tf}` OpenStreetMap - ${rss_dirurl}/$tf - - OSM Torrent $tf (torrent size: `find -maxdepth 1 -name $tf -printf "%s"`) + ${rss_dirurl}/${tf} + + OSM Torrent ${tf} (torrent size: `find -maxdepth 1 -name ${tf} -printf "%s"`) __EOF done # RSS footer printf '\n\n' >> "${rss_path}" - cd "$old_pwd" + cd "${old_pwd}" mv "${rss_path}" "${disk_dir}" }