Unix Technical Forum

here-documents in ebuild

This is a discussion on here-documents in ebuild within the Gentoo Linux Support forums, part of the Unix Operating Systems category; --> pk wrote: > That seems indeed a bug. In the environment, the function becomes Actually, it looks like a ...


Go Back   Unix Technical Forum > Unix Operating Systems > Gentoo Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 04-15-2008, 08:31 PM
pk
 
Posts: n/a
Default Re: here-documents in ebuild

pk wrote:

> That seems indeed a bug. In the environment, the function becomes


Actually, it looks like a bash issue.

$ cat myfunc.txt
#!/bin/bash

myfunc () {

grep aaa <<- EOF || echo "not found"
bbb
cc
ddd
EOF

}

$ source ./myfunc.txt
$ export -f myfunc
$ env
[snip]
myfunc=() { grep aaa <<-EOF
bbb
cc
ddd
EOF
|| echo "not found"
}

$ bash
bash: myfunc: line 5: syntax error near unexpected token `||'
bash: myfunc: line 5: ` || echo "not found"'
bash: error importing function definition for `myfunc'
$


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 04-15-2008, 08:31 PM
Michael Mauch
 
Posts: n/a
Default Re: here-documents in ebuild

pk wrote:
> pk wrote:
>
>> That seems indeed a bug. In the environment, the function becomes

>
> Actually, it looks like a bash issue.


Yes. A similar problem has been reported last May:

<http://groups.google.com/group/gnu.bash.bug/browse_thread/thread/802616f21defd15e/841f90c44ccf917b?lnk=gst&q=export+here+doc#841f90c 44ccf917b>

Regards...
Michael
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 04-15-2008, 08:31 PM
pk
 
Posts: n/a
Default Re: here-documents in ebuild

Michael Mauch wrote:

>> Actually, it looks like a bash issue.

>
> Yes. A similar problem has been reported last May:
>
>

<http://groups.google.com/group/gnu.bash.bug/browse_thread/thread/802616f21defd15e/841f90c44ccf917b?lnk=gst&q=export+here+doc#841f90c 44ccf917b>

Ah well. Let's hope it will be fixed in some upcoming bash version, then...

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:50 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com