File: GenLocalParams

package info (click to toggle)
eximdoc4 4.99-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,884 kB
  • sloc: perl: 935; javascript: 182; makefile: 180; sh: 88; xml: 68
file content (31 lines) | stat: -rwxr-xr-x 654 bytes parent folder | download | duplicates (6)
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