Ticket #14733: trac_14733_version_regexp.patch

File trac_14733_version_regexp.patch, 691 bytes (added by chapoton, 9 years ago)
  • spkg/bin/sage

    # HG changeset patch
    # User Frederic Chapoton <chapoton at math.univ-lyon1.fr>
    # Date 1373195762 -7200
    # Node ID 64f94c16e0243b6b6a47205dae772cfd93c884ef
    # Parent  03524410ff29e50865525f1e1c6c2a52c0157c00
    trac 14733 minor change in regexp to find version
    
    diff --git a/spkg/bin/sage b/spkg/bin/sage
    a b fi 
    340340#####################################################################
    341341
    342342if [ "$1" = '-v' -o "$1" = '-version' -o "$1" = '--version' ]; then
    343     exec sed -n -e '/Version/s/^[ |]\{1,\}//;/Version/s/[ |]\{1,\}$//p' \
     343    exec sed -n -e 's/.*\(Sage Version.*Date: [0-9-]*\).*/\1/p' \
    344344        "$SAGE_LOCAL"/bin/sage-banner
    345345fi
    346346