Ticket #9960: trac_9960-scripts-SAGE_CHECK.patch

File trac_9960-scripts-SAGE_CHECK.patch, 3.5 KB (added by jhpalmieri, 11 years ago)

scripts repo: depends on #9644

  • sage-build

    # HG changeset patch
    # User J. H. Palmieri <palmieri@math.washington.edu>
    # Date 1285103166 25200
    # Node ID c5aa472d19ac8535c4f7c1eacd4fce0b929a45f0
    # Parent  4f3a3b706ed0cef962c9592416e991cef855a9b6
    #9960: require SAGE_CHECK to be "yes"
    
    diff -r 4f3a3b706ed0 -r c5aa472d19ac sage-build
    a b  
    11#!/usr/bin/env bash
    22
    33build() {
    4    if [ -d $SAGE_ROOT/devel/$1/ ]; then
    5       cd $SAGE_ROOT/devel/$1/
     4   if [ -d "$SAGE_ROOT/devel/$1/" ]; then
     5      cd "$SAGE_ROOT/devel/$1/"
    66      chmod +x ./install
    77      echo ""
    88      echo "----------------------------------------------------------"
     
    3434      fi
    3535      cd $CUR
    3636
    37       ./install $SAGE_ROOT
     37      ./install "$SAGE_ROOT"
    3838      if [ $? -ne 0 ]; then
    3939         echo "sage: There was an error installing modified $1 library code."
    4040         echo ""
     
    4545   fi
    4646}
    4747
    48 $SAGE_ROOT/local/bin/sage-env 1>/dev/null
    49 
    5048if [ "$1" = "-b" ]; then
    5149    DO_BUILD_ALL=1
    5250    shift
  • sage-env

    diff -r 4f3a3b706ed0 -r c5aa472d19ac 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
     
    198198fi
    199199
    200200if [ "$1" = "-short" ]; then
    201     exit 0
     201    return 0
    202202fi
    203203
    204204if [ -z "$RHOME" ]; then
     
    257257
    258258if [ "$SAGE64" != "yes" -a "$SAGE64" != "no" ]; then
    259259    echo "The environment variable SAGE64 (=$SAGE64) must be either unset, yes or no."
    260     exit 1
     260    return 1
    261261fi
    262262
    263263# In case SAGE64 has been set to yes before re-inject it into the environment
    264264# This is only done on OSX and Solaris since those are the only real multi lib
    265265# arches we support. Eventually Linux PPC on the PS3 might need to be added here
    266 source $SAGE_LOCAL/bin/sage-check-64 2> /dev/null
     266source $SAGE_LOCAL/bin/sage-check-64 1> /dev/null 2> /dev/null
    267267export SAGE64
    268268
    269269if [ "$CXXFLAGS" = "" ]; then
  • sage-sage

    diff -r 4f3a3b706ed0 -r c5aa472d19ac sage-sage
    a b  
    142142if [ $? -ne 0 ]; then
    143143   echo "Error setting environment variables by running \"$SAGE_ROOT/local/bin/sage-env\";"
    144144   echo "possibly contact sage-devel (see http://groups.google.com/group/sage-devel)."
     145   exit 1
    145146fi
    146147
    147148# SAGE startup script passes some funny options, which are
  • sage-spkg

    diff -r 4f3a3b706ed0 -r c5aa472d19ac sage-spkg
    a b  
    358358    echo "Successfully installed $PKG_NAME"
    359359
    360360    cd $BASEDIR
    361     if [ "$SAGE_CHECK" != "" -a -f spkg-check ]; then
     361    if [ "x$SAGE_CHECK" = "xyes" -a -f spkg-check ]; then
    362362        echo "Running the test suite."
    363363        chmod +x spkg-check
    364364        ./spkg-check