View Single Post

   
  #6 (permalink)  
Old 04-15-2008, 08:31 PM
Nikos Chantziaras
 
Posts: n/a
Default Re: here-documents in ebuild

pk wrote:
> Nikos Chantziaras wrote:
>
>> It is indented with tabs, and the script runs OK on it's own.

>
> How do you run an ebuild on its own? What commands did you try?


With "on its own" I meant that a script using this construct is accepted
perfectly by bash.

#! /bin/sh
../frob <<- EOF || echo "frob failed"
foo
bar
EOF

The above works OK. Btw, when you try to emerge the
app-text/htp-1.15.ebuild you pointed me to (once unmasked), you'll see
that it dies during the early steps with the same message:


/var/tmp/portage/app-text/htp-1.15/temp/environment: line 184: syntax
error near unexpected token `||'
/var/tmp/portage/app-text/htp-1.15/temp/environment: line 184: ` || die'


I guess the only solution is to check the result of the test afterwards
with something like [ $? -eq 0 ] || die "frob failed"
Reply With Quote