summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhillip Berndt <pberndt@spline.de>2013-09-10 10:18:50 +0200
committerPhillip Berndt <pberndt@spline.de>2013-09-10 10:18:50 +0200
commit0725aff23cd2d3876c8fa48adff8e59f9021b74f (patch)
tree4287209b29df84d48e56834e153fc8db54777aa0
parent5afde763a0e72e82adca82180114545d8c44f02f (diff)
downloadcomics-0725aff23cd2d3876c8fa48adff8e59f9021b74f.tar.gz
comics-0725aff23cd2d3876c8fa48adff8e59f9021b74f.tar.bz2
comics-0725aff23cd2d3876c8fa48adff8e59f9021b74f.zip
Only change the index.html symlink if $daysago is 0
-rwxr-xr-xbin/get-comics8
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