#5852: Properly canonicalize $SAGE_ROOT
-------------------------------+--------------------------------------------
Reporter: tornaria | Owner: jdemeyer
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.7.3
Component: scripts | Resolution:
Keywords: | Work_issues:
Upstream: N/A | Reviewer:
Author: Jeroen Demeyer | Merged:
Dependencies: |
-------------------------------+--------------------------------------------
Comment(by jdemeyer):
Replying to [comment:33 leif]:
> You just have to
> * strip the program name, and
> * if no path remains after that, it's the current working directory,
i.e. path=".".
> * `cd` to that path and do `pwd -P`. Doesn't matter whether the path
was relative or absolute.
Again, this does not work if the executable itself is a symbolic link.
It could very well be that my solution is too complicated, but your
solution is certainly too simple.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5852#comment:34>
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.