Ticket #9433: trac_9433-scripts.3.patch

File trac_9433-scripts.3.patch, 4.3 KB (added by jhpalmieri, 9 years ago)

new version, using "hg clone". apply to scripts repo.

  • sage-make_devel_packages

    # HG changeset patch
    # User J. H. Palmieri <palmieri@math.washington.edu>
    # Date 1280329465 25200
    # Node ID 4a2a210fabc569ae2e8bc72e941a1c11ae22ef8f
    # Parent  0d52f2ab19ca0553d886ba71443d13e79c50c72c
    #9433: put more files under revision control
    
    diff -r 0d52f2ab19ca -r 4a2a210fabc5 sage-make_devel_packages
    a b rm sage-*~ 
    142142
    143143cp -pr sage-* .hg* ipy_profile_sage.py $SCRIPTS/
    144144cp -p $SAGE_ROOT/sage-python $SCRIPTS/
    145 cp -p $SAGE_ROOT/*.txt $SCRIPTS/
     145cp -p $SAGE_ROOT/COPYING.txt $SCRIPTS/
     146cp -p $SAGE_ROOT/README.txt $SCRIPTS/
    146147cp -pr $SAGE_ROOT/ipython $SCRIPTS/
    147148cp -p $SAGE_ROOT/spkg/install $SCRIPTS/
    148149cp -p $SAGE_ROOT/local/bin/sage-spkg-install $SCRIPTS/spkg-install
    if [ ! -f $PKG/sage_scripts-$SAGE_VERSIO 
    160161    echo "The package sage_scripts-$SAGE_VERSION.spkg wasn't created."
    161162    exit 1
    162163fi
     164
     165# SAGE ROOT PACKAGE: don't make spkg file, just tag it with the new version.
     166
     167cd $SAGE_ROOT
     168
     169#./sage-push
     170hg diff
     171hg status
     172hg tag "$SAGE_VERSION"
     173hg commit -m "$SAGE_VERSION"
     174
     175if [ $? -ne 0 ]; then
     176    echo "Error pushing sage root repository."
     177    exit 1
     178fi
  • sage-sdist

    diff -r 0d52f2ab19ca -r 4a2a210fabc5 sage-sdist
    a b fi 
    4949mkdir $TMP
    5050
    5151cd $SAGE_ROOT
    52 cp -LRp makefile *.txt *.sage sage ipythonrc $TMP/
    5352STD=standard
    5453mkdir $TMP/$PKGDIR
    5554mkdir $TMP/$PKGDIR/$STD
    56 cp -p $PKGDIR/$STD/deps $TMP/$PKGDIR/$STD/
    57 cp -p $PKGDIR/$STD/libdist_filelist $TMP/$PKGDIR/$STD/
    58 cp -p $PKGDIR/$STD/newest_version $TMP/$PKGDIR/$STD/
    5955cp -pr $PKGDIR/base $TMP/$PKGDIR/
    60 cp -p $PKGDIR/install $TMP/$PKGDIR/
    61 cp -p $PKGDIR/pipestatus $TMP/$PKGDIR/
    62 cp -p $PKGDIR/update $TMP/$PKGDIR/
    63 cp -p $PKGDIR/gen_html $TMP/$PKGDIR/
    64 cp -p $PKGDIR/README.txt $TMP/$PKGDIR/
    6556
    6657$SAGE_ROOT/local/bin/sage-make_devel_packages $SAGE_VERSION $SAGE_ROOT $TMP/devel
    6758
    if [ $? -ne 0 ]; then 
    7061    exit 1
    7162fi
    7263
     64# copy sage root repo over:
     65$SAGE_ROOT/sage --hg clone --pull . $TMP
     66
    7367cp $TMP/devel/*.spkg $SAGE_ROOT/$PKGDIR/$STD/
    7468
    7569cp -p $PKGDIR/$STD/*.spkg $TMP/$PKGDIR/$STD/
    76 cp -p $PKGDIR/$STD/*.txt $TMP/$PKGDIR/$STD/
    7770
    7871cd $TMP/$PKGDIR/$STD
    7972rm -rf doc-* sage-* extcode-* sage_scripts-* examples-*
  • sage-spkg-install

    diff -r 0d52f2ab19ca -r 4a2a210fabc5 sage-spkg-install
    a b fi 
    2525# Finally, make sure some symbolic links exist.
    2626cd "$CUR"
    2727
    28 # These are not part of the scripts repo and are
    29 # not under revision control, so they get wacked (at least
    30 # we do save the last versions in tmp, just in case).
    31 TMP="$SAGE_ROOT"/tmp/
    32 if [ ! -d "$TMP" ]; then
    33     mkdir "$TMP"
    34 fi
    35 cp "$SAGE_ROOT"/sage-python "$TMP"/
    36 cp sage-python "$SAGE_ROOT"/
    37 
    38 cp "$SAGE_ROOT"/spkg/install "$TMP"/
    39 cp install "$SAGE_ROOT"/spkg/
    40 
    41 cp "$SAGE_ROOT"/*.txt "$TMP"/
    42 cp *.txt "$SAGE_ROOT"/
    43 
    44 rm -rf "$TMP"/ipython
    45 cp -r "$SAGE_ROOT"/ipython "$TMP"/
    46 cp -r ipython "$SAGE_ROOT/"
    47 
    4828# I think these below should moved to the relevant spkg's. 
    4929# -- William Stein (2007-10-04)
    5030cd "$TARGET"
    5131ln -sf python sage.bin
    5232ln -sf Singular sage_singular
    5333ln -sf gp sage_pari
    54 
  • sage-upgrade

    diff -r 0d52f2ab19ca -r 4a2a210fabc5 sage-upgrade
    a b if [ $? -ne 0 ]; then 
    3232    exit 1
    3333fi
    3434
     35# Finally check for the existence of the SAGE_ROOT mercurial
     36# repository.  If it's not there, create it and also create the file
     37# .hgignore.  See #9433.
     38hg="$SAGE_ROOT/sage --hg"
     39
     40create_repo() {   
     41    $hg init .
     42    $hg add .hgignore COPYING.txt README.txt makefile sage sage-python
     43    cd spkg
     44    $hg add README.txt gen_html install pipestatus
     45    cd standard
     46    $hg add README.txt deps libdist_filelist newest_version
     47    $hg commit --message 'created SAGE_ROOT repo during upgrade'
     48}
     49
     50cd $SAGE_ROOT
     51$hg branch &> /dev/null
     52if [ $? -ne 0 ]; then
     53    # repo does not exist, so create it, along with the file .hgignore.
     54    echo "Creating top-level Mercurial repository"
     55
     56    cat > .hgignore <<EOF
     57.BUILDSTART
     58sage-README-osx.txt
     59~$
     60.hgignore~
     61data
     62devel
     63dist
     64examples
     65.*\.log
     66ipython
     67local
     68tmp
     69spkg/base
     70spkg/build
     71spkg/installed
     72spkg/logs
     73spkg/standard/.*\.spkg
     74spkg/optional
     75EOF
     76
     77    create_repo
     78    if [ $? -ne 0 ]; then
     79        echo "Error creating top-level Mercurial repository"
     80        exit 1
     81    fi
     82fi