#11602: install_scripts should use "$@" instead of $*
----------------------+-----------------------------------------------------
   Reporter:  Stefan  |          Owner:  jason                            
       Type:  defect  |         Status:  needs_review                     
   Priority:  minor   |      Milestone:  sage-4.7.2                       
  Component:  misc    |       Keywords:  install_scripts, hg, command line
Work_issues:          |       Upstream:  N/A                              
   Reviewer:          |         Author:                                   
     Merged:          |   Dependencies:                                   
----------------------+-----------------------------------------------------
Changes (by jhpalmieri):

  * status:  needs_work => needs_review


Comment:

 Replying to [comment:10 leif]:
 >  you really have to add the quotes around `$@` since this has a
 different meaning, namely quoting ''each element of'' `$@`.

 Sorry, I missed the quotes in your original comment

 >  * `command` is a '''shell built-in''', and hence not an executable to
 be found along  `PATH`, so we need `shell=True` and a single string
 containing `command -v ...` rather than a list of arguments.

 On OS X, it works with `shell=False`.  I see now that on linux, it
 doesn't.

 >  * Removing `$SAGE_ROOT/local/bin` from `PATH` should IMHO be more
 robust w.r.t. redundant slashs and `normpath()` or `realpath()`.

 I guess on POSIX systems, the directories are always separated by colons.
 (If not, are there any functions in the Python library for parsing PATH
 and then reassembling it?  Is there a function or variable saying what the
 separator is?)  So the new patch fixes this.  (In this case, anyway, the
 relevant portion of the PATH variable is set by sage-env, which uses the
 value of SAGE_ROOT, so "SAGE_ROOT/local/bin" should be there as is.  This
 seems to be the case on several different machines in which my Sage
 install is buried under various symbolic links.)

 > Also, if ignore_existing==True and some system-wide version of a program
 exists, a shortcut will be installed regardless of whether a / the Sage
 version to which the shortcut is made exists.

 Right.  See the new version.

 > I'd also move the close() right before "Created script ...".

 Okay.

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