Ticket #10231: 10231_scripts.patch

File 10231_scripts.patch, 3.2 KB (added by jdemeyer, 9 years ago)

Patch for the scripts repo

  • sage-make_devel_packages

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1289144124 -3600
    # Node ID 4d6136fb7a4bb4edccc5e54b4cd5c1073e515358
    # Parent  1e609ba12b7fc947c76006a40ca9c8b10c956446
    #10231: Don't rebuild examples and extcode
    
    diff -r 1e609ba12b7f -r 4d6136fb7a4b sage-make_devel_packages
    a b  
    11#!/usr/bin/env bash
    22
    33########################################################
    4 # Rebuild SAGE packages related to development, e.g.,
    5 #    sage_scripts, sage, doc, extcode
     4# Rebuild SAGE packages related to development, i.e.
     5#    sage_scripts, sage
    66# This script should be called by the SAGE script
    77########################################################
    88
     
    1919TARGET="sage-"$1
    2020
    2121# REMOVE OLD PACKAGES
    22 cd "$SAGE_ROOT"/spkg/standard/
    23 rm doc-*.spkg
    24 rm examples-*.spkg
    25 rm extcode-*.spkg
    26 rm sage-*.spkg
    27 rm sage_scripts-*.spkg
     22cd "$SAGE_ROOT/spkg/standard/"
     23rm -f sage-*.spkg
     24rm -f sage_scripts-*.spkg
    2825
    2926if [ $# -eq 2 ]; then
    3027   DESTINATION="$SAGE_ROOT"/spkg/standard/
     
    4037DESTINATION=`pwd`
    4138PKG=$DESTINATION
    4239
     40#################################
     41
    4342# NEW SAGE SOURCE PACKAGE
    4443if [ -d $SAGE_ROOT/devel/sage-main ]; then
    4544   cd $SAGE_ROOT/devel/sage-main
     
    6362    exit 1
    6463fi
    6564
    66 # NEW SAGE EXTERNAL CODE PACKAGE
    67 if [ -d $SAGE_ROOT/data/extcode ]; then
    68    cd $SAGE_ROOT/data/extcode
    69    hg diff
    70    hg status
    71    hg tag "$SAGE_VERSION"
    72    hg commit -m "$SAGE_VERSION"
    73  
    74    #./sage-push
    75    chmod +x spkg-dist
    76    ./spkg-dist $SAGE_VERSION $SAGE_ROOT
    77    if [ $? -ne 0 ]; then
    78        echo "Error building the extcode package"
    79        exit 1
    80    fi
    81    mv extcode-$SAGE_VERSION.spkg $DESTINATION/
    82    touch $SPKG_INST/extcode-$SAGE_VERSION
    83 fi
    84 
    85 
    86 if [ ! -f $PKG/extcode-$SAGE_VERSION.spkg ]; then
    87     echo "The package extcode-$SAGE_VERSION.spkg wasn't created."
    88     exit 1
    89 fi
    90 
    91 # NEW SAGE EXAMPLE CODE PACKAGE
    92 if [ -d $SAGE_ROOT/examples ]; then
    93    cd $SAGE_ROOT/examples
    94    hg diff
    95    hg status
    96    hg tag "$SAGE_VERSION"
    97    hg commit -m "$SAGE_VERSION"
    98    #./sage-push
    99    cd ..
    100    rm -rf examples-$SAGE_VERSION
    101    cp -r examples examples-$SAGE_VERSION
    102    "$SAGE_ROOT"/sage -pkg examples-$SAGE_VERSION
    103    if [ $? -ne 0 ]; then
    104        echo "Error building examples package"
    105        exit 1
    106    fi
    107    mv examples-$SAGE_VERSION.spkg $DESTINATION/
    108    rm -rf examples-$SAGE_VERSION
    109    touch $SPKG_INST/examples-$SAGE_VERSION
    110 fi
    111 
    112 if [ ! -f $PKG/examples-$SAGE_VERSION.spkg ]; then
    113     echo "The package examples-$SAGE_VERSION.spkg wasn't created."
    114     exit 1
    115 fi
    116 
    117 
    11865#################################
    11966
    120 
    12167# NEW SAGE SCRIPTS PACKAGE
    12268SCRIPTS=sage_scripts-$SAGE_VERSION
    12369cd $SAGE_ROOT/local/bin/
  • sage-sdist

    diff -r 1e609ba12b7f -r 4d6136fb7a4b sage-sdist
    a b  
    7070    exit 1
    7171fi
    7272
    73 cp $TMP/devel/*.spkg $SAGE_ROOT/$PKGDIR/$STD/
    74 
    7573cp -p $PKGDIR/$STD/*.spkg $TMP/$PKGDIR/$STD/
    7674cp -p $PKGDIR/$STD/*.txt $TMP/$PKGDIR/$STD/
    7775
    7876cd $TMP/$PKGDIR/$STD
    79 rm -rf doc-* sage-* extcode-* sage_scripts-* examples-*
     77rm -rf sage-* sage_scripts-*
    8078mv $TMP/devel/*.spkg .
    8179rmdir $TMP/devel
    8280