#9493: Remove extra baggage from ECL 10.2.1.p1 (again)
------------------------------+---------------------------------------------
   Reporter:  leif            |       Owner:  tbd     
       Type:  task            |      Status:  new     
   Priority:  major           |   Milestone:  sage-4.6
  Component:  packages        |    Keywords:          
     Author:  Leif Leonhardy  |    Upstream:  N/A     
   Reviewer:                  |      Merged:          
Work_issues:                  |  
------------------------------+---------------------------------------------

Comment(by leif):

 Replying to [comment:5 drkirkby]:
 > I don't think
 >
 {{{
 if [ -d patches ] && [ `ls patches` != "" ]; then
 }}}
 >
 > is safe. I don't think the order is guaranteed, so the second part could
 be evaluated before the first.

 (Even if it was, it doesn't make a difference, but...)

 Like in C, the second expression is only evaluated if needed (same for
 {{{||}}}), such that

 {{{
 #!sh
 foo && bar || baz
 }}}
 is equivalent to
 {{{
 #!sh
 if foo; then
     bar
 else
     baz
 fi
 }}}


 However, the {{{[ `ls patches` != "" ]}}} is suboptimal. The whole line
 could be
 {{{
 #!sh
 if ls patches/* >/dev/null 2>/dev/null; then
 }}}

 (One could substitute `ls` by e.g. `cat`, too.)  It was just one
 suggestion anyway.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9493#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to