diff --git a/hblock b/hblock index e5e1d58..ad30b2a 100755 --- a/hblock +++ b/hblock @@ -712,6 +712,11 @@ main() { ${C?} Generated with hBlock ${HBLOCK_VERSION:?} (${HBLOCK_REPOSITORY:?}) ${C?} Blocked domains: ${blocklistCount:?} EOF + if [ -z "${SOURCE_DATE_EPOCH+x}" ]; then + cat <<-EOF + ${C?} Date: $(date) + EOF + fi fi # If the header file is not empty, it is appended to the output file. diff --git a/resources/tests/env.sh b/resources/tests/env.sh index 7786ac8..5ccf582 100644 --- a/resources/tests/env.sh +++ b/resources/tests/env.sh @@ -13,6 +13,7 @@ SCRIPT_DIR="$(CDPATH='' cd -- "$(dirname -- "${0:?}")" && pwd -P)" export HOSTNAME='hblock' export ETCDIR="${SCRIPT_DIR:?}/etc" export XDG_CONFIG_HOME="${ETCDIR:?}" +export SOURCE_DATE_EPOCH='0' export HBLOCK_VERSION='0.0.0' export HBLOCK_REPOSITORY='https://example.com'