summaryrefslogtreecommitdiffstats
path: root/tests/aux
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-03-17 14:35:56 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-03-17 14:35:56 (EDT)
commitd6ec6b189b1363efde5053c5c961fa272047edda (patch)
tree79a3ee9ae1f675e32c3daf0f33ebc41c04a81054 /tests/aux
parenta99ef42126ff02a752c403450b455095b572c2d9 (diff)
tests/aux/setup.sh: Write files with cat and here-documents
This is clearer than printf.
Diffstat (limited to 'tests/aux')
-rw-r--r--tests/aux/setup.sh22
1 files changed, 17 insertions, 5 deletions
diff --git a/tests/aux/setup.sh b/tests/aux/setup.sh
index 42d9a08..9954b54 100644
--- a/tests/aux/setup.sh
+++ b/tests/aux/setup.sh
@@ -19,14 +19,26 @@
set -eu
+MAINTAINER='"J. Random Hacker" <jrandom@example.com>'
+
cd "${1}"
rm -Rf 'pkg/'
mkdir -p 'pkg/tmp/'
cd 'pkg/'
-printf '2.0\n' >'format'
-printf 'Maintainer: "J. Random Hacker" <jrandom@example.com>\n' >'control'
-printf 'foo (1.0) trunk\n * Initial release.\n -- %s %s\n' \
- '"J. Random Hacker" <jrandom@example.com>' \
- 'Thu, 01 Jan 1970 00:00:00 +0000' >'changelog'
+
+cat >'format' <<-EOF
+ 2.0
+ EOF
+
+cat >'control' <<-EOF
+ Maintainer: ${MAINTAINER}
+ EOF
+
+cat >'changelog' <<-EOF
+ foo (1.0) trunk
+ * Initial release.
+ -- ${MAINTAINER} Thu, 01 Jan 1970 00:00:00 +0000
+ EOF
+
cd 'tmp/'