This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by hintonda on Jul 30 2017, 12:30 PM.

Details

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)

Event Timeline

hintonda created this revision.Jul 30 2017, 12:30 PM
ilya-biryukov requested changes to this revision.Jul 31 2017, 1:20 AM

Thanks for fixing that. I've only tested on bash 4.3.
Could you also update utils/docker/scripts/build_install_llvm.sh for consistency?

This revision now requires changes to proceed.Jul 31 2017, 1:20 AM
hintonda updated this revision to Diff 108920.Jul 31 2017, 7:09 AM
hintonda edited edge metadata.
  • Apply here-document fix to all scripts for consistency.
This revision is now accepted and ready to land.Jul 31 2017, 7:51 AM
This revision was automatically updated to reflect the committed changes.