summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-07-17 10:25:39 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-07-17 10:25:39 (EDT)
commitc197a34e253b414349a8b75b7944923e02f3e893 (patch)
tree9d5eff3a72289c6095b002026d5a788755de1c18 /src
parentba99d9f57416a6126824f1dc9c97c12afe114dd3 (diff)
ppt-make: Add delimiters to maint fields if needed
Diffstat (limited to 'src')
-rw-r--r--src/ppt-make14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/ppt-make b/src/ppt-make
index 4e36267..eb9a475 100644
--- a/src/ppt-make
+++ b/src/ppt-make
@@ -15,12 +15,22 @@ main()
prompt 'Maintainer name' MAINTAINER_NAME
prompt 'Maintainer e-mail address' MAINTAINER_MAILBOX
+ if [ "x${MAINTAINER_NAME#\"}" = "x${MAINTAINER_NAME}" ]; then
+ if [ "x${MAINTAINER_NAME#*[()<>\[\]:;@\\,.]}" != \
+ "x${MAINTAINER_NAME}" ]; then
+ MAINTAINER_NAME="\"${MAINTAINER_NAME}\""
+ fi
+ fi
+ if [ "x${MAINTAINER_MAILBOX#<}" = "x${MAINTAINER_MAILBOX}" ]; then
+ MAINTAINER_MAILBOX="<${MAINTAINER_MAILBOX}>"
+ fi
+
date="$(LC_ALL='POSIX' date '+%a, %d %b %Y %H:%M:%S %z')"
printf '2.0\n' >format
cat >control <<-EOF
- Maintainer: ${MAINTAINER_NAME} <${MAINTAINER_MAILBOX}>
+ Maintainer: ${MAINTAINER_NAME} ${MAINTAINER_MAILBOX}
Build-Depends: platconf-pkg-tools (>= ${PPT_VERSION%.*})
EOF
@@ -29,7 +39,7 @@ main()
* Initial release.
- -- ${MAINTAINER_NAME} <${MAINTAINER_MAILBOX}> ${date}
+ -- ${MAINTAINER_NAME} ${MAINTAINER_MAILBOX} ${date}
EOF
mkdir src src/build src/run