Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mtg@gnu.org>2016-10-31 00:17:15 -0400
committerMike Gerwitz <mtg@gnu.org>2016-10-31 00:17:49 -0400
commitf3bba8812cb47b7cbc013b4eb844b46be2354f4a (patch)
treea8ae29d1c6d3cfa980d7ee59518f9659c4d31292
parent6c95ba243a7dfec393c06415f0747ab9d6d7d2dc (diff)
downloadrepo2html-f3bba8812cb47b7cbc013b4eb844b46be2354f4a.tar.gz
repo2html-f3bba8812cb47b7cbc013b4eb844b46be2354f4a.tar.bz2
repo2html-f3bba8812cb47b7cbc013b4eb844b46be2354f4a.zip
Correct index year range
-rwxr-xr-xprocessor12
1 files changed, 6 insertions, 6 deletions
diff --git a/processor b/processor
index 4b6c470..a2ecf8f 100755
--- a/processor
+++ b/processor
@@ -2,7 +2,7 @@
#
# Generates HTML from repository commit messages
#
-# Copyright (C) 2012 Mike Gerwitz
+# Copyright (C) 2012, 2016 Mike Gerwitz
#
# This file is part of repo2html.
#
@@ -55,8 +55,8 @@ do-index()
prevdate=
lastts=
- firstyear=0
lastyear=0
+ firstyear=
lasthash=
# generate index
@@ -79,8 +79,8 @@ do-index()
# commits are ordered by date desc
lasthash="${lasthash:-$hash}"
lastts="${lastts:-$ts}"
- lastyear="${lastyear:-$year}"
- firstyear="$year"
+ firstyear="${firstyear:-$year}"
+ lastyear="$year"
pagefile_base="$( outfgen "$ts" "$id" )"
pagefile_url="$pagefile_base$html_url_ext"
@@ -115,8 +115,8 @@ do-index()
$footout
yearrange="$firstyear"
- if [ "$lastyear" -gt "$firstyear" ]; then
- yearrange="$firstyear&ndash;$lastyear"
+ if [ "$firstyear" -gt "$lastyear" ]; then
+ yearrange="$lastyear&ndash;$firstyear"
fi
}