diff options
author | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2013-12-04 11:29:29 +0000 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2013-12-04 13:14:29 +0000 |
commit | 0471e76a7d188349e9b3d9866610fb02845f764e (patch) | |
tree | c318d89298498e159c435f7b4d0f879ee748bf14 | |
parent | 65a79d59bd9a40d2356378a09ce4828808a3c917 (diff) | |
download | openssl-new-baserock/pedroalvarez/power-port.tar.gz |
Modify the block's character of yaml to avoid future problemsbaserock/pedroalvarez/power-port
When blocks of text are flowed with >, e.g.
key: value
foo: >
The quick brown fox jumps
over the lazy dog.
The new-lines of the text block are removed. This causes confusion
when shell scripts are involved, as the following Yaml would be
parsed as one shell command, rather than two:
command: >
echo foo bar
ls
This escaped detection since if text is indented, Yaml treats it as
a different block, so
command: >
if true; then
echo foo bar
fi
is parsed correctly, but
command: >
if true; then
echo foo bar
ls
fi
is not.
To avoid this confusion, we can always use `|`, which will preserve
the newlines, so an explicit continuation can be requested with a
`\` at the end of the line.
command: |
echo foo bar \
baz quux
-rw-r--r-- | openssl-new.morph | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openssl-new.morph b/openssl-new.morph index d92bba165d..2ed14ff248 100644 --- a/openssl-new.morph +++ b/openssl-new.morph @@ -3,7 +3,7 @@ kind: chunk max-jobs: 1 configure-commands: - sed -i -e 's,^LIBNAMES=\\(.*\\) padlock \\(.*\\),LIBNAMES=\\1 \\2,g' engines/Makefile -- > +- | if [ "$(uname -m)" = "ppc64" ]; then sh ./Configure linux-ppc64 --openssldir=/etc/ssl --prefix="${PREFIX-/usr}" --libdir=lib shared else |