Bug 375290 - build scripts should avoid <<EOF ... EOF construct
Summary: build scripts should avoid <<EOF ... EOF construct
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Releng (show other bugs)
Version: 4.2   Edit
Hardware: PC Linux
: P4 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Releng-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-26 04:02 EDT by David Williams CLA
Modified: 2016-08-11 15:24 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Williams CLA 2012-03-26 04:02:12 EDT
note to self ... there's a few places in build scripts similar to 

cat >>$buildResults/compilelogs.html <<EOF
<tr><td><a href="$f">$PA_FN - $FN</a></td></tr>
EOF

Where the <<EOF
....
EOF

is used. 

It is pretty handy, but, I've found it sensitive to formatting. The closing EOF has to start in the very first column (I guess be proceeded by and EOL) and once when doing some "automatice" formatting, correcting indentations, some of them were "move over" to align with their associated code, when then lead to some hard to track down errors (similar to when a quote is missing and hundreds of lines later you get an "unexpected end of file found". (reminds of the very first fortran compiler I used ... if there was a compile error, the only message you got was "a compiler error occurred" :) 

At any rate ... code that's sensitive to formatting is kind of fragile (especially for new comers who don't often use this "block input" construct often ... so, would be nice to find another way to do the same thing, not so fragile to formatting.
Comment 1 David Williams CLA 2016-08-11 15:24:42 EDT
Doing a mass "reset to default assignee" of 52 bugs to help make clear it will (very likely) not be me working on things I had previously planned to work on. I hope this will help prevent the bugs from "getting lost" in other people's queries. Feel free to "take" a bug if appropriate.