Ticket #12082: 12082_scripts_cp_pr.patch

File 12082_scripts_cp_pr.patch, 2.0 KB (added by jdemeyer, 11 years ago)
  • .hgignore

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1322242473 -3600
    # Node ID e1b587003b1bf5bec812e832379923605184db85
    # Parent  08e1c643238ae3750d8d91c85e0097e5532d7cb3
    Preserve timestamp upon spkg installation
    Remove various unneeded symbolic links
    Remove unused sage-cleantmp script
    
    diff --git a/.hgignore b/.hgignore
    a b  
    225225zeoserverlog.py
    226226zeoup.py
    227227zodbload.py
    228 sage.bin
    229228sage_fortran
    230229sage_fortran.bin
    231 sage_pari
    232230f2c
    233231f2py
    234232g95
  • deleted file sage-cleantmp

    diff --git a/sage-cleantmp b/sage-cleantmp
    deleted file mode 100755
    + -  
    1 #!/usr/bin/env python
    2 
    3 import os, shutil
    4 cmd = "ps u"
    5 
    6 pids = []
    7 for L in os.popen(cmd).read().split('\n'):
    8     if 'sage.bin' in L:
    9         pids.append(int(L.split()[1]))
    10 
    11 pids = set(pids)
    12 
    13 D = '%s/.sage/tmp'%os.environ['HOME']
    14 
    15 for F in os.listdir(D):
    16     if not int(F) in pids:
    17         try:
    18             shutil.rmtree('%s/%s'%(D,F))
    19         except OSError, msg:
    20             pass
    21 
    22 
  • sage-spkg-install

    diff --git a/sage-spkg-install b/sage-spkg-install
    a b  
    77TARGET="$SAGE_ROOT/local/bin/"
    88
    99if [ -d "$TARGET"/.hg ]; then
    10 
    1110    # Merge the repositories, rather than overwrite changes
    1211    # that the user may have made.
    1312   cd "$TARGET"
     
    1615   hg merge tip
    1716   hg ci -m "Check-in during upgrade of Sage."
    1817   hg update
    19 
    2018else
    21 
    2219    # Initial install.  Just copy all the files over.
    23     cp -r sage-*  *doctest.py SbuildHack.pm .hg* ipy_profile_sage.py "$TARGET"
    24 
     20    cp -pR sage-*  *doctest.py SbuildHack.pm .hg* ipy_profile_sage.py "$TARGET"
    2521fi
    2622
    2723# Create an appropriate hgrc file for the target
     
    2925[diff]
    3026git = true
    3127HEREDOC
    32 
    33 # Finally, make sure some symbolic links exist.
    34 cd "$CUR"
    35 
    36 # I think these below should moved to the relevant spkg's. 
    37 # -- William Stein (2007-10-04)
    38 cd "$TARGET"
    39 ln -sf python sage.bin
    40 ln -sf Singular sage_singular
    41 ln -sf gp sage_pari