[docker] Fix unmatched quote problem in here-document on older versions of bash

Summary:
When outputing usage, emit here-document directly instead of
saving in a variable first -- avoids problem with bash 3.2.57 where an
unmatched ' in the here-document results in the following error:

./build_docker_image.sh: line 135: unexpected EOF while looking for matching `''

bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16)

Differential Revision: https://reviews.llvm.org/D36064

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309568 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Don Hinton 2017-07-31 15:18:57 +00:00
parent 837b97fb9a
commit 842110c5bc
2 changed files with 2 additions and 6 deletions

View File

@ -15,7 +15,7 @@ DOCKER_TAG=""
BUILDSCRIPT_ARGS=""
function show_usage() {
usage=$(cat << EOF
cat << EOF
Usage: build_docker_image.sh [options] [-- [cmake_args]...]
Available options:
@ -64,8 +64,6 @@ $ ./build_docker_image.sh -s debian8 -d mydocker/clang-debian8 -t "latest" \
-DCLANG_ENABLE_BOOTSTRAP=ON \
-DCLANG_BOOTSTRAP_TARGETS="install-clang;install-clang-headers"
EOF
)
echo "$usage"
}
SEEN_INSTALL_TARGET=0

View File

@ -11,7 +11,7 @@
set -e
function show_usage() {
usage=$(cat << EOF
cat << EOF
Usage: build_install_llvm.sh [options] -- [cmake-args]
Checkout svn sources and run cmake with the specified arguments. Used
@ -37,8 +37,6 @@ Required options: At least one --install-target.
All options after '--' are passed to CMake invocation.
EOF
)
echo "$usage"
}
LLVM_SVN_REV=""