diff options
Diffstat (limited to 'bin/get-comics')
-rwxr-xr-x | bin/get-comics | 8 |
1 files 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 |