# 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 sagemake_devel_packages
a

b


1  1  #!/usr/bin/env bash 
2  2  
3  3  ######################################################## 
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 
6  6  # This script should be called by the SAGE script 
7  7  ######################################################## 
8  8  
… 
… 

19  19  TARGET="sage"$1 
20  20  
21  21  # 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 
 22  cd "$SAGE_ROOT/spkg/standard/" 
 23  rm f sage*.spkg 
 24  rm f sage_scripts*.spkg 
28  25  
29  26  if [ $# eq 2 ]; then 
30  27  DESTINATION="$SAGE_ROOT"/spkg/standard/ 
… 
… 

40  37  DESTINATION=`pwd` 
41  38  PKG=$DESTINATION 
42  39  
 40  ################################# 
 41  
43  42  # NEW SAGE SOURCE PACKAGE 
44  43  if [ d $SAGE_ROOT/devel/sagemain ]; then 
45  44  cd $SAGE_ROOT/devel/sagemain 
… 
… 

63  62  exit 1 
64  63  fi 
65  64  
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   #./sagepush 
75   chmod +x spkgdist 
76   ./spkgdist $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   #./sagepush 
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   
118  65  ################################# 
119  66  
120   
121  67  # NEW SAGE SCRIPTS PACKAGE 
122  68  SCRIPTS=sage_scripts$SAGE_VERSION 
123  69  cd $SAGE_ROOT/local/bin/ 
diff r 1e609ba12b7f r 4d6136fb7a4b sagesdist
a

b


70  70  exit 1 
71  71  fi 
72  72  
73   cp $TMP/devel/*.spkg $SAGE_ROOT/$PKGDIR/$STD/ 
74   
75  73  cp p $PKGDIR/$STD/*.spkg $TMP/$PKGDIR/$STD/ 
76  74  cp p $PKGDIR/$STD/*.txt $TMP/$PKGDIR/$STD/ 
77  75  
78  76  cd $TMP/$PKGDIR/$STD 
79   rm rf doc* sage* extcode* sage_scripts* examples* 
 77  rm rf sage* sage_scripts* 
80  78  mv $TMP/devel/*.spkg . 
81  79  rmdir $TMP/devel 
82  80  