From f85da868ac1db5f75fd0eb9d31e49a4c32bcdf82 Mon Sep 17 00:00:00 2001 From: Simon Byrne Date: Tue, 7 Jul 2020 22:25:37 -0700 Subject: [PATCH] Improve Travis sample in the docs (#17420) - printf is better than echo for multiline strings - ** should be && - use line continuation - Use multiline block --- lib/spack/docs/workflows.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/spack/docs/workflows.rst b/lib/spack/docs/workflows.rst index 17ca695082..2f215f8209 100644 --- a/lib/spack/docs/workflows.rst +++ b/lib/spack/docs/workflows.rst @@ -1405,11 +1405,12 @@ The main points that are implemented below: - export CXXFLAGS="-std=c++11" install: - - if ! which spack >/dev/null; then + - | + if ! which spack >/dev/null; then mkdir -p $SPACK_ROOT && git clone --depth 50 https://github.com/spack/spack.git $SPACK_ROOT && - echo -e "config:""\n build_jobs:"" 2" > $SPACK_ROOT/etc/spack/config.yaml ** - echo -e "packages:""\n all:""\n target:"" ['x86_64']" + printf "config:\n build_jobs: 2\n" > $SPACK_ROOT/etc/spack/config.yaml && + printf "packages:\n all:\n target: ['x86_64']\n" \ > $SPACK_ROOT/etc/spack/packages.yaml; fi - travis_wait spack install cmake@3.7.2~openssl~ncurses