Add generation date in the banner, fixes #103

This commit is contained in:
Héctor Molinero Fernández 2022-06-26 16:19:45 +02:00
commit d57ca35cd7
2 changed files with 6 additions and 0 deletions

5
hblock
View file

@ -712,6 +712,11 @@ main() {
${C?} Generated with hBlock ${HBLOCK_VERSION:?} (${HBLOCK_REPOSITORY:?}) ${C?} Generated with hBlock ${HBLOCK_VERSION:?} (${HBLOCK_REPOSITORY:?})
${C?} Blocked domains: ${blocklistCount:?} ${C?} Blocked domains: ${blocklistCount:?}
EOF EOF
if [ -z "${SOURCE_DATE_EPOCH+x}" ]; then
cat <<-EOF
${C?} Date: $(date)
EOF
fi
fi fi
# If the header file is not empty, it is appended to the output file. # If the header file is not empty, it is appended to the output file.

View file

@ -13,6 +13,7 @@ SCRIPT_DIR="$(CDPATH='' cd -- "$(dirname -- "${0:?}")" && pwd -P)"
export HOSTNAME='hblock' export HOSTNAME='hblock'
export ETCDIR="${SCRIPT_DIR:?}/etc" export ETCDIR="${SCRIPT_DIR:?}/etc"
export XDG_CONFIG_HOME="${ETCDIR:?}" export XDG_CONFIG_HOME="${ETCDIR:?}"
export SOURCE_DATE_EPOCH='0'
export HBLOCK_VERSION='0.0.0' export HBLOCK_VERSION='0.0.0'
export HBLOCK_REPOSITORY='https://example.com' export HBLOCK_REPOSITORY='https://example.com'