From 0725aff23cd2d3876c8fa48adff8e59f9021b74f Mon Sep 17 00:00:00 2001 From: Phillip Berndt Date: Tue, 10 Sep 2013 10:18:50 +0200 Subject: Only change the index.html symlink if $daysago is 0 --- bin/get-comics | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/get-comics b/bin/get-comics index f959a6e..3b2a368 100755 --- a/bin/get-comics +++ b/bin/get-comics @@ -38,7 +38,9 @@ else ${top}/bin/gen.py "${daysago}" >> ${top}/log/gen-html.log 2>&1 fi -relativ_path="$(date +sites/%Y/%m/%d.html --date "$daysago days ago")" -if [ -f "${top}/htdocs/${relativ_path}" ]; then - ln -sf "${relativ_path}" "${top}/htdocs/index.html" +if [ "$daysago" = "0" ]; then + relativ_path="$(date +sites/%Y/%m/%d.html --date "$daysago days ago")" + if [ -f "${top}/htdocs/${relativ_path}" ]; then + ln -sf "${relativ_path}" "${top}/htdocs/index.html" + fi fi -- cgit v1.2.3-1-g7c22