On Tue, 29 Mar 2011 17:05:01 -0400
"Aaron W. Swenson" <titanof...@gentoo.org> wrote:

> > - Suppressing stdout of commands like "do_action env update" is fine,
> >   but why suppress stderr?
> > 
> Because 'ls' would complain that files didn't exist, such as lib*.dylib
> when on a Linux system. It doesn't matter. But, using 'find' avoids this
> mess.

Never use ls to get filenames in a script.  Instead of 

  for link_source in $(eval ls ${source_dir} 2> /dev/null) ; do

just use

  for link_source in "${source_dir}"/* ; do

I see you already fixed this one, but you do some funky stuff with ls -d
earlier on.

http://mywiki.wooledge.org/BashPitfalls#for_i_in_.24.28ls_.2A.mp3.29


-- 
fonts, gcc-porting,                  it makes no sense how it makes no sense
toolchain, wxwidgets                           but i'll take it free anytime
@ gentoo.org                EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662

Attachment: signature.asc
Description: PGP signature

Reply via email to