#10303: clean up sage-check-64 and use of SAGE64
--------------------------------------------+-------------------------------
Reporter: jhpalmieri | Owner: GeorgSWeber
Type: defect | Status: positive_review
Priority: minor | Milestone: sage-4.6.1
Component: build | Keywords: 64
Author: John Palmieri | Upstream: N/A
Reviewer: David Kirkby, Leif Leonhardy | Merged:
Work_issues: |
--------------------------------------------+-------------------------------
Comment(by leif):
P.S.:
{{{
#!sh
#!/this/file/must/be/sourced
flagfile=... # whatever its name / location is
# Set SAGE64 to "ignore" on everything but MacOS X / [Open]Solaris unless
SAGE_PORT is set:
test -z "$SAGE_PORT" &&
case "$UNAME" in
Darwin|SunOS) # Add other operating systems later if appropriate.
# Do nothing here.
;;
*)
export SAGE64=ignore
esac
test -z "$SAGE64" && export SAGE64=no # default to no if not set
case "$SAGE64" in
yes|no)
# Also make sure SAGE_LOCAL is defined if it is used; here or
above.
if [ -f "$flagfile" ]; then
saved64=`cat "$flagfile"`
if [ "$saved64" != "$SAGE64" ]; then
# inconsistent -> error
fi
else
echo $SAGE64 > "$flagfile"
fi
;;
ignore) # do nothing
;;
*)
# invalid value -> error
esac
# And no messages, only errors to stderr
}}}
A bit shorter, isn't it?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10303#comment:28>
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.