here-documents in ebuild I'm writing an ebuild that has a src_test() and one of the tests needs
to be a here-document (command <<- EOF). But I need to do a 'die
"Failed"' call if the test fails and I can't get the syntax right.
Imagine this:
src_test() {
./frob <<- EOF || die "frob failed"
foo
bar
EOF
}
It passes 'ebuild digest' but fails on emerge. What's the right syntax?
Here's the error message:
[...]temp/environment: line 2329: syntax error near unexpected token `||'
[...]/temp/environment: line 2329: ` || die "frob failed";'
*
* Call stack:
* ebuild.sh, line 1641: Called die
* The specific snippet of code:
* preprocess_ebuild_env || \
* die "error processing environment"
* The die message:
* error processing environment |