Ticket #9960: trac_9960-scripts-SAGE_CHECK_rebased_to_4.6.1.rc0.patch

File trac_9960-scripts-SAGE_CHECK_rebased_to_4.6.1.rc0.patch, 3.0 KB (added by leif, 10 years ago)

SCRIPTS REPO. (Just) John's patch rebased to Sage 4.6.1.rc0.

  • sage-env

    # HG changeset patch
    # User J. H. Palmieri <palmieri@math.washington.edu>
    # Date 1293728555 -3600
    # Node ID 9e4f7775bc7035e1fc90c1102264ea1f534642f2
    # Parent  cd55de2f84b552a15c14613e6c467147c37ec790
    #9960: require SAGE_CHECK to be "yes" (rebased to Sage 4.6.1.rc0 by leif)
    
    The patch also fixes some other flaws (now use return instead of exit
    in sage-env, exit with 1 if sourcing sage-env failed).
    
    Any output of sage-check-64 is redirected to /dev/null, to IMHO be
    changed (perhaps by my reviewer patch; only stdout should be redi-
    rected).
    
    -leif
    
    diff -r cd55de2f84b5 -r 9e4f7775bc70 sage-env
    a b  
    4242        echo "Error: You must set the SAGE_ROOT environment"
    4343        echo "variable or run this script from the SAGE_ROOT or "
    4444        echo "SAGE_ROOT/local/bin/ directory."
    45         exit 1
     45        return 1
    4646    else
    4747        SAGE_ROOT="$GUESSED_SAGE_ROOT"
    4848        export SAGE_ROOT
     
    5858        echo "a bad value. You must correct it or erase it and"
    5959        echo "run this script from the SAGE_ROOT or"
    6060        echo "SAGE_ROOT/local/bin/ directory." 
    61         exit 1
     61        return 1
    6262    fi
    6363fi
    6464
     
    8282    echo "It is currently \"$SAGE_ROOT\"."
    8383    echo "Please correct this by moving Sage (or renaming one or more directories) first."
    8484    echo "Exiting now..."
    85     exit 1
     85    return 1
    8686fi
    8787
    8888
     
    222222fi
    223223
    224224if [ "$1" = "-short" ]; then
    225     exit 0
     225    return 0
    226226fi
    227227
    228228if [ -z "$RHOME" ]; then
     
    281281
    282282if [ "$SAGE64" != "yes" -a "$SAGE64" != "no" ]; then
    283283    echo "The environment variable SAGE64 (=$SAGE64) must be either unset, yes or no."
    284     exit 1
     284    return 1
    285285fi
    286286
    287287# In case SAGE64 has been set to yes before re-inject it into the environment
    288288# This is only done on OSX and Solaris since those are the only real multi lib
    289289# arches we support. Eventually Linux PPC on the PS3 might need to be added here
    290 source $SAGE_LOCAL/bin/sage-check-64 2> /dev/null
     290source $SAGE_LOCAL/bin/sage-check-64 1> /dev/null 2> /dev/null
    291291export SAGE64
    292292
    293293if [ "$CXXFLAGS" = "" ]; then
  • sage-sage

    diff -r cd55de2f84b5 -r 9e4f7775bc70 sage-sage
    a b  
    225225if [ $? -ne 0 ]; then
    226226   echo >&2 "Error setting environment variables by running \"$SAGE_ROOT/local/bin/sage-env\";"
    227227   echo >&2 "possibly contact sage-devel (see http://groups.google.com/group/sage-devel)."
     228   exit 1
    228229fi
    229230
    230231# Sage startup script passes some funny options, which are
  • sage-spkg

    diff -r cd55de2f84b5 -r 9e4f7775bc70 sage-spkg
    a b  
    368368    echo "Successfully installed $PKG_NAME"
    369369
    370370    cd $BASEDIR
    371     if [ "$SAGE_CHECK" != "" -a -f spkg-check ]; then
     371    if [ "x$SAGE_CHECK" = "xyes" -a -f spkg-check ]; then
    372372        echo "Running the test suite."
    373373        chmod +x spkg-check
    374374        ./spkg-check