#10303: clean up sage-check-64 and use of SAGE64
-----------------------------+----------------------------------------------
Reporter: jhpalmieri | Owner: GeorgSWeber
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-4.6.1
Component: build | Keywords: 64
Author: John Palmieri | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------------+----------------------------------------------
Comment(by drkirkby):
To my knowledge, {{{source}}} and dot are the same for '''Bourne''' type
shells, which includes {{{/bin/sh}}} and {{{/bin/bash}}} as well as other
shells like the Korn shell.
However csh and tcsh are different animals. It not really a good idea to
use them for scripts - see
http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/
For interactive use, csh/tcsh have their own syntax which is quite
different from sh/bash/ksh etc.
Assuming you have forced your scripts to use bash, then using {{{source}}}
is acceptable. But I think it's better to get into a habit of using more
portable constructs, avoiding bashisms.
There were (perhaps still are) some error messages generated in Sage when
building on Solaris due to the use of {{{source}}}. They might have all
gone now though, if a shell now uses bash rather than /bin/sh.
Note using bash for scripts is in general not a great idea, as its size
makes it slow. That's why some Linux distributions like Ubunta & Debian
link /bin/sh to /bin/dash and use the lighter-weight dash shell. But if
you use #!/bin/sh at the top, you need to be more careful about what you
write if you want it to be portable.
If you source a file, no matter how you do it, then if it exits you will
still be back in script you sourced it from. So what you see is to be
expected.
If the script is only called from one place, you might consider just
writing it inline, and not sourcing the file at all.
Dave
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10303#comment:25>
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.