#!/usr/bin/env bash

YEAR=$(date +%Y)
sed "s/__YEAR__/${YEAR}/" compilable/extra-files/ddocYear.html > ${RESULTS_DIR}/compilable/ddocYear.html.1
grep -v "Generated by Ddoc from" ${RESULTS_DIR}/compilable/ddocYear.html > ${RESULTS_DIR}/compilable/ddocYear.html.2
diff --strip-trailing-cr ${RESULTS_DIR}/compilable/ddocYear.html.1 ${RESULTS_DIR}/compilable/ddocYear.html.2
if [ $? -ne 0 ]; then
    exit 1;
fi

rm ${RESULTS_DIR}/compilable/ddocYear.html{,.1,.2}
