Ticket #11459: trac_11459-root.patch

File trac_11459-root.patch, 1.8 KB (added by kini, 10 years ago)

apply to $SAGE_ROOT

  • spkg/bin/sage

    # HG changeset patch
    # User Sebastien Labbe <slabqc at gmail.com>
    # Date 1337178163 -28800
    # Node ID a3081ceaf3c065a30cfa738e4cb47314ec01f797
    # Parent  0409fc873e3b1a9fbe5fd62c44c10b873d9569a7
    #11459: adding rst2txt and rst2sws to local bin scripts
    
    diff --git a/spkg/bin/sage b/spkg/bin/sage
    a b  
    183183    echo
    184184    ####  1.......................26..................................................78
    185185    ####  |.....................--.|...................................................|
     186    echo "File conversion:"
     187    echo "  -rst2txt [...]      -- Generates Sage worksheet text file from standalone "
     188    echo "                         reStructuredText source. "
     189    echo "  -rst2sws [...]      -- Generates Sage worksheet (.sws) from standalone "
     190    echo "                         reStructuredText source. "
     191
     192    echo
     193    ####  1.......................26..................................................78
     194    ####  |.....................--.|...................................................|
    186195    echo "Making Sage packages or distributions:"
    187196    echo "  -bdist VER          -- build a binary distribution of Sage"
    188197    echo "  -combinat [...]     -- run sage-combinat patch management script"
     
    642651   exit $?
    643652fi
    644653
     654#####################################################################
     655# File conversion
     656#####################################################################
     657
     658if [ "$1" = '-rst2txt' -o "$1" = '--rst2txt' ]; then
     659    cd "$CUR"
     660    shift
     661    sage-rst2txt "$@"
     662    exit $?
     663fi
     664
     665if [ "$1" = '-rst2sws' -o "$1" = '--rst2sws' ]; then
     666    cd "$CUR"
     667    shift
     668    sage-rst2sws "$@"
     669    exit $?
     670fi
    645671
    646672#####################################################################
    647673# Crap