diff --git a/bin/gen-years.sh b/bin/gen-years.sh
index b028f4c5e..da2dbeb90 100755
--- a/bin/gen-years.sh
+++ b/bin/gen-years.sh
@@ -565,14 +565,15 @@ fi
# write markdown for each IOCCC year in reverse order
#
-export YEAR_COUNT=0
+YEAR_COUNT=$(wc -l < "$TOP_FILE" | sed -e 's/[[:space:]]//g')
+export YEAR_COUNT
export YYYY
for YYYY in $("$TAC_TOOL" "$TOP_FILE"); do
# debug YYYY
#
if [[ $V_FLAG -ge 1 ]]; then
- echo "$0: debug[1]: starting to process year: $YYYY" 1>&2
+ echo "$0: debug[1]: using: $TOP_FILE starting to process year: $YYYY" 1>&2
fi
# verify that YYYY is a readable directory
@@ -624,10 +625,6 @@ for YYYY in $("$TAC_TOOL" "$TOP_FILE"); do
continue
fi
- # count this year
- #
- ((++YEAR_COUNT))
-
# write leading markdown for this IOCCC year
#
{
@@ -766,7 +763,7 @@ for YYYY in $("$TAC_TOOL" "$TOP_FILE"); do
else
cat > /dev/null
if [[ $V_FLAG -ge 3 ]]; then
- echo "$0: debug[3]: because of -n, $YYYY_DIR markdown data is NOT written into: $TMP_YEARS_MD" 1>&2
+ echo "$0: debug[3]: because of -n, markdown data is NOT written into: $TMP_YEARS_MD" 1>&2
fi
fi
@@ -784,6 +781,10 @@ for YYYY in $("$TAC_TOOL" "$TOP_FILE"); do
echo "$0: debug[3]: because of -n, IOCCC year $YYYY ending markdown data is NOT written into: $TMP_YEARS_MD" 1>&2
fi
fi
+
+ # count down this year
+ #
+ ((--YEAR_COUNT))
done
# use the md2html.sh tool to form a location HTML file, unless -n
diff --git a/years.html b/years.html
index aa3bc048a..3f054974a 100644
--- a/years.html
+++ b/years.html
@@ -120,7 +120,7 @@ href="#1990">1990 | 1989 | 1988 | 1987
1986 | 1985 | 1984
Download IOCCC 2020 entry source
Jump to: top
-Download IOCCC 2019 entry source
Jump to: top
-Download IOCCC 2018 entry source
Jump to: top
-Download IOCCC 2015 entry source
Jump to: top
-Download IOCCC 2014 entry source
Jump to: top
-Download IOCCC 2013 entry source
Jump to: top
-Download IOCCC 2012 entry source
Jump to: top
-Download IOCCC 2011 entry source
Jump to: top
-Download IOCCC 2006 entry source
Jump to: top
-Download IOCCC 2005 entry source
Jump to: top
-Download IOCCC 2004 entry source
Jump to: top
-Download IOCCC 2001 entry source
Jump to: top
-Download IOCCC 2000 entry source
Jump to: top
-Download IOCCC 1996 entry source
Jump to: top
-Download IOCCC 1995 entry source
Jump to: top
-Download IOCCC 1994 entry source
Jump to: top
-Download IOCCC 1993 entry source
Jump to: top
-Download IOCCC 1992 entry source
Jump to: top
-Download IOCCC 1991 entry source
Jump to: top
-Download IOCCC 1990 entry source
Jump to: top
-Download IOCCC 1989 entry source
Jump to: top
-Download IOCCC 1988 entry source
Jump to: top
-Download IOCCC 1987 entry source
Jump to: top
-Download IOCCC 1986 entry source
Jump to: top
-Download IOCCC 1985 entry source
Jump to: top
-Download IOCCC 1984 entry source