1 | initial version |
The script at $SAGE_ROOT/local/bin/sage-env
sets the shell environment up for building spks's. Here's what it reads at the top:
###########################################################################
#
# Set environment variables for building and/or running Sage.
# You must *source* this instead of executing; see below!
#
# AUTHORS: William Stein 2005-12
# David Kirkby <david.kirkby@onetel.net> 2005-12-17
#
###########################################################################
##########################################################################
#
# If you want to set all environment variables for your shell like
# they are during the build of Sage packages, type
#
# source local/bin/sage-env
#
# from the SAGE_ROOT directory. To do the same from a /bin/bash
# script use ". local/bin/sage-env".
#
##########################################################################
Note that you should run source local/bin/sage-env
from $SAGE_ROOT
for it to work.
2 | added info from comment |
The script at $SAGE_ROOT/local/bin/sage-env
sets the shell environment up for building spks's. Here's what it reads at the top:
###########################################################################
#
# Set environment variables for building and/or running Sage.
# You must *source* this instead of executing; see below!
#
# AUTHORS: William Stein 2005-12
# David Kirkby <david.kirkby@onetel.net> 2005-12-17
#
###########################################################################
##########################################################################
#
# If you want to set all environment variables for your shell like
# they are during the build of Sage packages, type
#
# source local/bin/sage-env
#
# from the SAGE_ROOT directory. To do the same from a /bin/bash
# script use ". local/bin/sage-env".
#
##########################################################################
Note that you should run source local/bin/sage-env
from $SAGE_ROOT
for it to work.
Essentially, sage -sh
calls your shell (say /bin/bash
) with an option to prevent loading of the user's .profile or rc file (for /bin/bash
it runs the shell without sourcing .profile
, .bash_profile
, .bashrc
) to ensure that the paths are correct. If you are using Bash, then running ./sage -sh
from $SAGE_ROOT
should be equivalent to doing:
> /bin/bash --norc
> source local/bin/sage-env