# HG changeset patch
# User mabshoff@sage.math.washington.edu
# Date 1195281701 28800
# Node ID 28509fc5fcc8318b0f9aa155cf54bf452c6213f9
# Parent  b41a3003d65da53886e8de347395296ff6fd91a0
fix bug so that spkg-check actually gets invoked when SAGE_CHECK is defined

diff -r b41a3003d65d -r 28509fc5fcc8 sage-spkg
--- a/sage-spkg	Tue Nov 06 21:49:03 2007 -0800
+++ b/sage-spkg	Fri Nov 16 22:41:41 2007 -0800
@@ -235,6 +235,7 @@ fi
 fi
 echo "****************************************************"
 
+BASEDIR=`pwd`
 time ./spkg-install
 
 if [ $? -eq 0 ]; then
@@ -250,11 +251,12 @@ if [ $? -eq 0 ]; then
    echo "SAGE VERSION: `grep SAGE $SAGE_LOCAL/bin/sage-banner`" >> "$PKG_NAME"
    echo "Successfully installed $PKG_NAME"
 
+   cd $BASEDIR
    if [ "$SAGE_CHECK" != "" -a -f spkg-check ]; then
        # this doesn't work at all yet.
        echo "Running the test suite."
        chmod +x spkg-test
-       ./spkg-test
+       ./spkg-check
        if [ $? -ne 0 ]; then
            echo "*************************************"
            echo "Error testing package ** $PKG_NAME **"
