From 2b95ae7640d3037ae89380f0a388ae27bfda200f Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 22 Dec 2016 20:13:03 +0100 Subject: [PATCH] Simplify HTML file link path determination. --- processor/metadata/default.feed_snippet.do | 3 +-- processor/metadata/default.index_snippet.do | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/processor/metadata/default.feed_snippet.do b/processor/metadata/default.feed_snippet.do index b09eaa0..3321ac4 100644 --- a/processor/metadata/default.feed_snippet.do +++ b/processor/metadata/default.feed_snippet.do @@ -9,8 +9,7 @@ intermediate_file="${1%.feed_snippet}.intermediate" redo-ifchange "$intermediate_file" # Get variables, write entry. -html_file=`escape_url "${src_file%.*}.html"` -html_file=${html_file#*/} +html_file=$(escape_url "${1%.feed_snippet}.html") lastmod=`stat -c%y "$src_file"` lastmod_rfc3339=`date -u "+%Y-%m-%dT%TZ" -d "$lastmod"` published=`stat -c%y "$uuid_file"` diff --git a/processor/metadata/default.index_snippet.do b/processor/metadata/default.index_snippet.do index d95b27b..e332350 100644 --- a/processor/metadata/default.index_snippet.do +++ b/processor/metadata/default.index_snippet.do @@ -9,6 +9,6 @@ html_file="${src_file%.*}.html" redo-ifchange "$html_file" # Get variables, write entry. -title_html=`cat "$intermediate_file" | head -1` -html_file_escaped=`escape_url "${html_file#*/}"` +title_html=$(cat "$intermediate_file" | head -1) +html_file_escaped=$(escape_url "${1%.index_snippet}.html") printf "
  • %s
  • \n" "$html_file_escaped" "$title_html" -- 2.30.2