if [ -z "$SAGE_LOCAL" ]; then
    echo >&2 "SAGE_LOCAL undefined ... exiting"
    echo >&2 "Maybe run 'sage --sh'?"
    exit 1
fi

cd src

$MAKE
if [ $? -ne 0 ]; then
    echo >&2 "Error building benzene."
    exit 1
fi

echo >&2 "Copying benzene..."
cp benzene $SAGE_LOCAL/bin/benzene
if [ $? -ne 0 ]; then
    echo >&2 "Error installing benzene."
    exit 1
fi

