Ticket #12167: 12167_ipython_scripts.patch

File 12167_ipython_scripts.patch, 1.1 KB (added by jdemeyer, 9 years ago)
  • sage-sage

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1324053497 -3600
    # Node ID 010217d55b6dce908a0b4e9ea7acd863e16ad042
    # Parent  bc1baf5c7d7b4f31e8c8883609857b6e20132853
    Move SAGE_ROOT/ipython to extcode: copy data/extcode/dotsage into $DOT_SAGE
    
    diff --git a/sage-sage b/sage-sage
    a b  
    256256LOGOPT=""
    257257
    258258sage_setup() {
     259    cd "$SAGE_LOCAL/bin"
     260
    259261    # Display the startup banner
    260262    if [ "$SAGE_BANNER" != "no" ]; then
    261         cat "$SAGE_LOCAL/bin/sage-banner"
     263        cat sage-banner
    262264    fi
    263265
    264266    # Check to see if the whole Sage install tree has moved.
    265267    # If so, change various hardcoded paths.
    266     "$SAGE_ROOT/local/bin/"sage-location
    267     if [ $? -ne 0 ]; then
    268         exit 1
    269     fi
     268    ./sage-location || exit
    270269
    271     cd "$SAGE_ROOT/local/bin"
    272270    IPYTHONDIR="$DOT_SAGE/ipython" && export IPYTHONDIR
    273271    IPYTHONRC="ipythonrc" && export IPYTHONRC
    274272    if [ ! -d "$IPYTHONDIR" ]; then
    275273        mkdir -p "$DOT_SAGE"
    276         cp -r "$SAGE_ROOT/ipython" "$DOT_SAGE/"
     274        cp -pR "$SAGE_ROOT"/data/extcode/dotsage/* "$DOT_SAGE" || exit
    277275    fi
    278276    sage-cleaner &>/dev/null &
    279277}