1
0
Fork 0

Correct index year range

master
Mike Gerwitz 2016-10-31 00:17:15 -04:00
parent 6c95ba243a
commit f3bba8812c
Signed by: mikegerwitz
GPG Key ID: 8C917B7F5DC51BA2
1 changed files with 6 additions and 6 deletions

View File

@ -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–$lastyear"
if [ "$firstyear" -gt "$lastyear" ]; then
yearrange="$lastyear–$firstyear"
fi
}