#12299: Upgrade Jmol to 12.3.27, Advance Jmol Interactive Features in Flask
Notebook
--------------------------------------------------------------+-------------
       Reporter:  gutow                                       |         Owner:  
jason, mpatel, was                                                       
           Type:  enhancement                                 |        Status:  
needs_review                                                             
       Priority:  major                                       |     Milestone:  
sage-pending                                                             
      Component:  notebook                                    |    Resolution:  
                                                                         
       Keywords:  Jmol, 3D, notebook                          |   Work issues:  
                                                                         
Report Upstream:  Fixed upstream, in a later stable release.  |     Reviewers:  
Karl-Dieter Crisman, Steven Trogdon, Punarbasu Purkayastha, John Palmieri
        Authors:  Jonathan Gutow                              |     Merged in:  
                                                                         
   Dependencies:  #11080,#11078,#11503,#13121                 |      Stopgaps:  
                                                                         
--------------------------------------------------------------+-------------

Comment (by ppurka):

 Well, the behavior I am getting on Linux is different (and what I
 expected). Let me first ensure that we are talking about the same script -
 `jmol-12.3.27.p1/patches/testjava.sh` (removing redundant lines):
 {{{
 #!/bin/bash
 type -atp java
 OUT=$?
 if [ $OUT -eq 0 ]; then
   java -version 2>&1|grep version.*[1]\.[567]
 fi
 }}}

 The problem is that if the `type` statement exits with a nonzero status,
 then `OUT` will be nonzero. The `if` statement will not execute and hence
 it will never reach the grep statement so as to give a nonzero return
 status. This can be checked by changing the line `type -atp java` with
 `type -atp not_present_command`. I get the following behavior
 {{{
 ...z/jmol-12.3.27.p1/patches» bash -x ./testjava.sh
 + type -atp not_present_command
 + OUT=1
 + '[' 1 -eq 0 ']'
 ...z/jmol-12.3.27.p1/patches» echo $?
 0

 # With the original script and java present
 ...z/jmol-12.3.27.p1/patches» bash -x ./testjava.sh
 + type -atp java
 /usr/bin/java
 + OUT=0
 + '[' 0 -eq 0 ']'
 + java -version
 + grep 'version.*[1].[567]'
 java version "1.6.0_33"
 ...z/jmol-12.3.27.p1/patches» echo $?
 0
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12299#comment:180>
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