1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#!/bin/sh -eu
output="${1:-local_params}"
: ${EXIM_VER:?Need the EXIM_VER environment variable}
nicedate="$(LC_ALL=C date --utc --date="$(dpkg-parsechangelog -l../debian/changelog -SDate)" +"%d %b %Y")"
if which locale >/dev/null; then
charset="$(locale | grep ^LC_CTYPE=)"
else
charset=unknown
fi
exec > "$output"
cat <<EOTEMPLATE
. # if this file changes, the build process will rebuild everything
. # locale's charset $charset
.macro version
${EXIM_VER}
.endmacro
.macro fulldate
${nicedate}
.endmacro
.macro year
$(date +%Y)
.endmacro
.macro versiondatexml
<revnumber>${EXIM_VER}</revnumber>
<date>${nicedate}</date>
.endmacro
EOTEMPLATE
|