Ticket #9433: trac_9433-scripts.v3-rebased.patch

File trac_9433-scripts.v3-rebased.patch, 16.6 KB (added by ddrake, 9 years ago)

rebased for 4.6.1.alpha0

  • sage-bdist

    # HG changeset patch
    # User J. H. Palmieri <palmieri@math.washington.edu>
    # Date 1285380804 25200
    # Node ID fa7bc24587ef975cde0c7028a8478de7365658cb
    # Parent  3b09ff90a82da8a8589314b2f4af54b0322a3ee4
    #9433: put more files under revision control
    
    diff --git a/sage-bdist b/sage-bdist
    a b  
    1717
    1818CUR=`pwd`
    1919
    20 OPT="pPR"
     20CP_OPT="-pPR"
    2121
    2222if [ $# -ne 2 ]; then
    2323   echo "Usage: $0 <SAGE_VERSION> <SAGE_ROOT>"
     
    3232TARGET=`echo $TARGET | sed -e 's/ //'`     #no blank spaces
    3333TMP="$CUR/tmp/$TARGET"
    3434
    35 if [ ! -d "$CUR/tmp" ]; then
    36    mkdir "$CUR/tmp"
    37 fi
     35mkdir -p "$CUR/tmp"
    3836
    39 if [ -d "$TMP" ]; then
    40    rm -rf "$TMP"
    41 fi
     37rm -rf "$TMP"
     38mkdir "$TMP"
     39
     40# copy sage root repo over:
     41cd "$SAGE_ROOT"
     42
     43echo "Copying root repository..."
     44"$SAGE_ROOT"/sage --hg clone --pull . "$TMP"
     45
     46if [ $? -ne 0 ]; then
     47    echo "Error copying Sage root repository."
     48    exit 1
     49
     50rm "$TMP"/.hg/hgrc
     51echo "Done copying root repository."
    4252
    4353mkdir "$TMP"
    4454
    4555cd "$SAGE_ROOT"
    4656
    4757echo "Copying files over to tmp directory"
    48 cp -$OPT examples local Makefile *.txt *.sage sage ipython data "$TMP"/
     58cp -$CP_OPT examples local data "$TMP"/
    4959
    5060if [ -d devel/sage-main ]; then
    5161   echo "Copying Sage library over"
    5262   mkdir "$TMP"/devel/
    53    cp -L$OPT devel/sage-main "$TMP"/devel/sage-main
    54    cp -L$OPT devel/sagenb-main "$TMP"/devel/sagenb-main
     63   cp -L $CP_OPT devel/sagenb-main "$TMP"/devel/sagenb-main
     64   cp -L $CP_OPT devel/sage-main "$TMP"/devel/sage-main
     65   cd "$TMP"/devel
    5566   cd $TMP/devel
    5667   ln -s sage-main sage
    5768   ln -s sagenb-main sagenb
     
    6576
    6677cd "$SAGE_ROOT"
    6778
    68 if [ -d $PKGDIR ]; then
     79if [ -d "$PKGDIR" ]; then
    6980   echo "Making empty spkg's"
    70    cd $PKGDIR
    71    mkdir $TMP/$PKGDIR
    72    mkdir $TMP/$PKGDIR/build
    73    mkdir $TMP/$PKGDIR/optional
    74    cp -$OPT installed $TMP/$PKGDIR/
    75    cp -$OPT standard $TMP/$PKGDIR/
    76    cp  install README.txt gen_html pipestatus $TMP/$PKGDIR/
    77    cd $TMP/$PKGDIR/standard/
     81   cd "$PKGDIR"
     82   mkdir "$TMP/$PKGDIR"/build
     83   mkdir "$TMP/$PKGDIR"/optional
     84   cp $CP_OPT installed "$TMP/$PKGDIR/"
     85   cp $CP_OPT standard "$TMP/$PKGDIR/"
     86   cd "$TMP/$PKGDIR"/standard/
    7887   for F in `/bin/ls *.spkg`; do
    79        echo "Placeholder spkg file so this binary version of Sage knows this package version used when installing Sage." > $F
     88       echo "Placeholder spkg file so this binary version of Sage knows this package version used when installing Sage." > "$F"
    8089   done
    8190fi
    8291
     
    8594    cd "$TARGET"
    8695    mkdir x
    8796    echo "There will be an error about x below that you can safely ignore."
    88     mv * x
     97    mv * .hg* x
    8998    mv x sage
    9099    cp sage/local/bin/sage-README-osx.txt README.txt
    91100
     
    117126        fi
    118127
    119128        echo 'Copying Sage.app'
    120         cp -L$OPT "$SAGE_ROOT/data/extcode/sage/ext/mac-app/build/$CONFIGURATION/Sage.app" ./Sage.app
     129        cp -L $CP_OPT "$SAGE_ROOT/data/extcode/sage/ext/mac-app/build/$CONFIGURATION/Sage.app" ./Sage.app
    121130        # Info.plist is a binary plist, so convert it for processing with sed.
    122131        # I would just change it to be an xml plist, but xcode changes it back.
    123132        plutil -convert xml1 ./Sage.app/Contents/Info.plist
     
    139148    if [ "$SAGE_APP_DMG" != "no" ]; then
    140149        echo "Creating dmg"
    141150        echo "(If you don't wish to create a disk image please set SAGE_APP_DMG=no)"
    142         DYLD_LIBRARY_PATH=$SAGE_ORIG_DYLD_LIBRARY_PATH; export DYLD_LIBRARY_PATH
     151        DYLD_LIBRARY_PATH="$SAGE_ORIG_DYLD_LIBRARY_PATH"; export DYLD_LIBRARY_PATH
    143152        hdiutil create -srcfolder "$TARGET" -format UDBZ "$TARGET".dmg
    144153    else
    145154        echo 'If you wish to create a disk image please set'
     
    154163    tar zcvf "$TARGET".tar.gz "$TARGET"
    155164fi
    156165
    157 if [ ! -d $SAGE_ROOT/dist ]; then
    158     mkdir $SAGE_ROOT/dist
    159 fi
     166mkdir -p "$SAGE_ROOT"/dist
    160167
    161 if [ -d $SAGE_ROOT/dist/$TARGET ]; then
    162     rm -rf "$SAGE_ROOT/dist/$TARGET"
    163 fi
     168rm -rf "$SAGE_ROOT/dist/$TARGET"
    164169
    165170echo "Moving final distribution file to $SAGE_ROOT/dist"
    166171
    167 mv $TARGET $SAGE_ROOT/dist/
    168 mv $TARGET.* $SAGE_ROOT/dist/
     172mv "$TARGET" "$SAGE_ROOT"/dist/
     173mv "$TARGET".* "$SAGE_ROOT"/dist/
  • sage-make_devel_packages

    diff --git a/sage-make_devel_packages b/sage-make_devel_packages
    a b  
    1414
    1515SAGE_VERSION=$1
    1616SAGE_ROOT=$2
    17 SPKG_INST=$SAGE_ROOT/spkg/installed/
     17SPKG_INST="$SAGE_ROOT"/spkg/installed/
    1818export SAGE_ROOT SAGE_VERSION
    19 TARGET="sage-"$1
     19TARGET=sage-$1
    2020
    2121# REMOVE OLD PACKAGES
    2222cd "$SAGE_ROOT"/spkg/standard/
     
    2525rm extcode-*.spkg
    2626rm sage-*.spkg
    2727rm sage_scripts-*.spkg
     28rm sage_root-*.spkg
    2829
    2930if [ $# -eq 2 ]; then
    3031   DESTINATION="$SAGE_ROOT"/spkg/standard/
     
    3233   DESTINATION=$3
    3334fi
    3435
    35 if [ ! -d $DESTINATION ]; then
    36    mkdir $DESTINATION
     36if [ ! -d "$DESTINATION" ]; then
     37   mkdir "$DESTINATION"
    3738fi
    3839
    3940cd "$DESTINATION"
    4041DESTINATION=`pwd`
    41 PKG=$DESTINATION
     42PKG="$DESTINATION"
    4243
    4344# NEW SAGE SOURCE PACKAGE
    44 if [ -d $SAGE_ROOT/devel/sage-main ]; then
    45    cd $SAGE_ROOT/devel/sage-main
     45if [ -d "$SAGE_ROOT"/devel/sage-main ]; then
     46   cd "$SAGE_ROOT"/devel/sage-main
    4647   hg diff
    4748   hg status
    4849   hg tag "$SAGE_VERSION"
    4950   hg commit -m "$SAGE_VERSION"
    5051   #./sage-push
    5152   chmod +x spkg-dist
    52    ./spkg-dist $SAGE_VERSION $SAGE_ROOT
     53   ./spkg-dist "$SAGE_VERSION" "$SAGE_ROOT"
    5354   if [ $? -ne 0 ]; then
    54        echo "Error building the sage source code package"
     55       echo "Error building the Sage source code package"
    5556       exit 1
    5657   fi
    57    mv dist/sage-$SAGE_VERSION.spkg $DESTINATION/
    58    touch $SPKG_INST/sage-$SAGE_VERSION
     58   mv dist/sage-"$SAGE_VERSION".spkg "$DESTINATION"/
     59   touch "$SPKG_INST"/sage-"$SAGE_VERSION"
    5960fi
    6061
    61 if [ ! -f $PKG/sage-$SAGE_VERSION.spkg ]; then
     62if [ ! -f "$PKG"/sage-"$SAGE_VERSION".spkg ]; then
    6263    echo "The package sage-$SAGE_VERSION.spkg wasn't created."
    6364    exit 1
    6465fi
    6566
    6667# NEW SAGE EXTERNAL CODE PACKAGE
    67 if [ -d $SAGE_ROOT/data/extcode ]; then
    68    cd $SAGE_ROOT/data/extcode
     68if [ -d "$SAGE_ROOT"/data/extcode ]; then
     69   cd "$SAGE_ROOT"/data/extcode
    6970   hg diff
    7071   hg status
    7172   hg tag "$SAGE_VERSION"
     
    7374 
    7475   #./sage-push
    7576   chmod +x spkg-dist
    76    ./spkg-dist $SAGE_VERSION $SAGE_ROOT
     77   ./spkg-dist "$SAGE_VERSION" "$SAGE_ROOT"
    7778   if [ $? -ne 0 ]; then
    7879       echo "Error building the extcode package"
    7980       exit 1
    8081   fi
    81    mv extcode-$SAGE_VERSION.spkg $DESTINATION/
    82    touch $SPKG_INST/extcode-$SAGE_VERSION
     82   mv extcode-"$SAGE_VERSION".spkg "$DESTINATION"/
     83   touch "$SPKG_INST"/extcode-"$SAGE_VERSION"
    8384fi
    8485
    8586
    86 if [ ! -f $PKG/extcode-$SAGE_VERSION.spkg ]; then
     87if [ ! -f "$PKG"/extcode-"$SAGE_VERSION".spkg ]; then
    8788    echo "The package extcode-$SAGE_VERSION.spkg wasn't created."
    8889    exit 1
    8990fi
    9091
    9192# NEW SAGE EXAMPLE CODE PACKAGE
    92 if [ -d $SAGE_ROOT/examples ]; then
    93    cd $SAGE_ROOT/examples
     93if [ -d "$SAGE_ROOT"/examples ]; then
     94   cd "$SAGE_ROOT"/examples
    9495   hg diff
    9596   hg status
    9697   hg tag "$SAGE_VERSION"
    9798   hg commit -m "$SAGE_VERSION"
    9899   #./sage-push
    99100   cd ..
    100    rm -rf examples-$SAGE_VERSION
    101    cp -r examples examples-$SAGE_VERSION
    102    "$SAGE_ROOT"/sage -pkg examples-$SAGE_VERSION
     101   rm -rf examples-"$SAGE_VERSION"
     102   cp -r examples examples-"$SAGE_VERSION"
     103   "$SAGE_ROOT"/sage -pkg examples-"$SAGE_VERSION"
    103104   if [ $? -ne 0 ]; then
    104105       echo "Error building examples package"
    105106       exit 1
    106107   fi
    107    mv examples-$SAGE_VERSION.spkg $DESTINATION/
    108    rm -rf examples-$SAGE_VERSION
    109    touch $SPKG_INST/examples-$SAGE_VERSION
     108   mv examples-"$SAGE_VERSION".spkg "$DESTINATION"/
     109   rm -rf examples-"$SAGE_VERSION"
     110   touch "$SPKG_INST"/examples-"$SAGE_VERSION"
    110111fi
    111112
    112 if [ ! -f $PKG/examples-$SAGE_VERSION.spkg ]; then
     113if [ ! -f "$PKG"/examples-"$SAGE_VERSION".spkg ]; then
    113114    echo "The package examples-$SAGE_VERSION.spkg wasn't created."
    114115    exit 1
    115116fi
     
    119120
    120121
    121122# NEW SAGE SCRIPTS PACKAGE
    122 SCRIPTS=sage_scripts-$SAGE_VERSION
    123 cd $SAGE_ROOT/local/bin/
     123SCRIPTS=sage_scripts-"$SAGE_VERSION"
     124cd "$SAGE_ROOT"/local/bin/
    124125
    125126#./sage-push
    126127hg diff
     
    133134    exit 1
    134135fi
    135136
    136 rm -rf $SCRIPTS
    137 mkdir $SCRIPTS
     137rm -rf "$SCRIPTS"
     138mkdir "$SCRIPTS"
    138139chmod +x sage-*
    139140chmod -x sage-README-osx.txt sage-banner sage-gdb-commands
    140141chmod -x sage-maxima.lisp sage-verify-pyc
    141142rm sage-*~
    142143
    143 cp -pr sage-* .hg* ipy_profile_sage.py $SCRIPTS/
    144 cp -p $SAGE_ROOT/sage-python $SCRIPTS/
    145 cp -p $SAGE_ROOT/*.txt $SCRIPTS/
    146 cp -pr $SAGE_ROOT/ipython $SCRIPTS/
    147 cp -p $SAGE_ROOT/spkg/install $SCRIPTS/
    148 cp -p $SAGE_ROOT/local/bin/sage-spkg-install $SCRIPTS/spkg-install
    149 cp -p $SAGE_ROOT/local/bin/SbuildHack.pm $SCRIPTS/
    150 cp -p $SAGE_ROOT/local/bin/ncadoctest.py $SCRIPTS/
    151 cp -p $SAGE_ROOT/local/bin/sagedoctest.py $SCRIPTS/
     144cp -pr sage-* .hg* ipy_profile_sage.py "$SCRIPTS"/
     145cp -p "$SAGE_ROOT"/local/bin/sage-spkg-install "$SCRIPTS"/spkg-install
     146cp -p "$SAGE_ROOT"/local/bin/SbuildHack.pm "$SCRIPTS"/
     147cp -p "$SAGE_ROOT"/local/bin/ncadoctest.py "$SCRIPTS"/
     148cp -p "$SAGE_ROOT"/local/bin/sagedoctest.py "$SCRIPTS"/
    152149
    153 chmod +x $SCRIPTS/spkg-install
    154 tar -jcf $SCRIPTS.spkg $SCRIPTS
    155 mv $SCRIPTS.spkg $DESTINATION/
    156 rm -rf $SCRIPTS
    157 touch $SPKG_INST/sage_scripts-$SAGE_VERSION
     150chmod +x "$SCRIPTS"/spkg-install
     151tar -jcf "$SCRIPTS".spkg "$SCRIPTS"
     152mv "$SCRIPTS".spkg "$DESTINATION"/
     153rm -rf "$SCRIPTS"
     154touch "$SPKG_INST"/sage_scripts-"$SAGE_VERSION"
    158155
    159 if [ ! -f $PKG/sage_scripts-$SAGE_VERSION.spkg ]; then
     156if [ ! -f "$PKG/sage_scripts-$SAGE_VERSION.spkg" ]; then
    160157    echo "The package sage_scripts-$SAGE_VERSION.spkg wasn't created."
    161158    exit 1
    162159fi
     160
     161#################################
     162
     163# SAGE ROOT PACKAGE: sage-sdist already tags and commits the repo, so
     164# we just need to build the spkg file.
     165
     166ROOT_REPO=sage_root-"$SAGE_VERSION"
     167cd "$SAGE_ROOT"
     168
     169rm -rf "$ROOT_REPO"
     170mkdir "$ROOT_REPO"
     171cd "$ROOT_REPO"
     172
     173echo "Copying root repository..."
     174"$SAGE_ROOT"/sage --hg clone --pull "$SAGE_ROOT" .
     175
     176if [ $? -ne 0 ]; then
     177    echo "Error copying Sage root repository."
     178    exit 1
     179fi
     180
     181rm .hg/hgrc
     182cd "$SAGE_ROOT"
     183
     184cp -p "$SAGE_ROOT"/spkg/root-spkg-install "$ROOT_REPO"/spkg-install
     185chmod +x "$ROOT_REPO"/spkg-install
     186
     187echo "Done copying root repository."
     188
     189tar -jcf "$ROOT_REPO".spkg "$ROOT_REPO"
     190mv "$ROOT_REPO".spkg "$DESTINATION"/
     191rm -rf "$ROOT_REPO"
     192touch "$SPKG_INST/$ROOT_REPO"
     193
     194if [ ! -f "$PKG/$ROOT_REPO".spkg ]; then
     195    echo "The package $ROOT_REPO.spkg wasn't created."
     196    exit 1
     197fi
  • sage-sdist

    diff --git a/sage-sdist b/sage-sdist
    a b  
    1515SAGE_VERSION=$1
    1616SAGE_ROOT=$2
    1717LD_LIBRARY_PATH="$SAGE_ROOT/local/lib:$LD_LIBRARY_PATH" && export LD_LIBRARY_PATH
    18 export SAGE_ROOT SAGE_VERSION 
    19 TARGET="sage-"$1
     18export SAGE_ROOT SAGE_VERSION
     19TARGET="sage-$1"
    2020
    2121CUR=`pwd`
    2222
    2323
    2424# UPDATE SAGE VERSION FILE: this is done here so
    2525# the banner produced below this if block is correct.
    26 if [ -d $SAGE_ROOT/devel/sage/sage ]; then
    27    cd $SAGE_ROOT/devel/sage/sage
     26if [ -d "$SAGE_ROOT"/devel/sage/sage ]; then
     27   cd "$SAGE_ROOT"/devel/sage/sage
    2828   echo '"""nodoctests"""' > version.py
    2929   echo "version='"$SAGE_VERSION"'; date='`date '+%Y-%m-%d'`'" >> version.py
    30    cd $SAGE_ROOT/devel/sage
     30   cd "$SAGE_ROOT"/devel/sage
    3131   python setup.py install
    3232fi
    3333
    34 cd $SAGE_ROOT/local/bin/
     34cd "$SAGE_ROOT"/local/bin/
    3535echo "import sage.misc.banner; sage.misc.banner.banner()" | ./python > sage-banner
    3636
    3737cd "$CUR"
    3838
    39 cp $SAGE_ROOT/local/bin/sage-spkg $PKGDIR/base/
    40 cp $SAGE_ROOT/local/bin/sage-env  $PKGDIR/base/
    41 cp $SAGE_ROOT/local/bin/sage-make_relative $PKGDIR/base/
     39cp "$SAGE_ROOT"/local/bin/sage-spkg $PKGDIR/base/
     40cp "$SAGE_ROOT"/local/bin/sage-env  $PKGDIR/base/
     41cp "$SAGE_ROOT"/local/bin/sage-make_relative $PKGDIR/base/
    4242
    4343TMP="/tmp/$TARGET"
    4444
    45 if [ -d $TMP ]; then
    46    rm -rf "$TMP"
     45rm -rf "$TMP"
     46mkdir "$TMP"
     47
     48# copy sage root repo over.  Cloning needs to be done in an empty
     49# directory, so we do this now.  The other sage repositories are dealt
     50# with later.
     51cd "$SAGE_ROOT"
     52
     53hg diff
     54hg status
     55hg tag "$SAGE_VERSION"
     56hg commit -m "$SAGE_VERSION"
     57
     58echo "Copying root repository..."
     59"$SAGE_ROOT"/sage --hg clone --pull . "$TMP"
     60
     61if [ $? -ne 0 ]; then
     62    echo "Error copying Sage root repository."
     63    exit 1
    4764fi
    4865
    49 mkdir $TMP
     66rm "$TMP"/.hg/hgrc
     67echo "Done copying root repository."
    5068
    51 cd $SAGE_ROOT
    52 cp -LRp Makefile *.txt *.sage sage ipythonrc $TMP/
    5369STD=standard
    54 mkdir $TMP/$PKGDIR
    55 mkdir $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/
    59 cp -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/
     70cp -pr "$PKGDIR"/base "$TMP/$PKGDIR/"
    6571
    66 $SAGE_ROOT/local/bin/sage-make_devel_packages $SAGE_VERSION $SAGE_ROOT $TMP/devel
     72"$SAGE_ROOT"/local/bin/sage-make_devel_packages "$SAGE_VERSION" "$SAGE_ROOT" "$TMP"/devel
    6773
    6874if [ $? -ne 0 ]; then
    6975    echo "Error building the Sage packages."
    7076    exit 1
    7177fi
    7278
    73 cp $TMP/devel/*.spkg $SAGE_ROOT/$PKGDIR/$STD/
     79cp "$TMP"/devel/*.spkg "$SAGE_ROOT/$PKGDIR/$STD/"
    7480
    75 cp -p $PKGDIR/$STD/*.spkg $TMP/$PKGDIR/$STD/
    76 cp -p $PKGDIR/$STD/*.txt $TMP/$PKGDIR/$STD/
     81cp -p "$PKGDIR/$STD"/*.spkg "$TMP/$PKGDIR/$STD/"
    7782
    78 cd $TMP/$PKGDIR/$STD
     83cd "$TMP/$PKGDIR/$STD"
    7984rm -rf doc-* sage-* extcode-* sage_scripts-* examples-*
    80 mv $TMP/devel/*.spkg .
    81 rmdir $TMP/devel
     85mv "$TMP"/devel/*.spkg .
     86rmdir "$TMP"/devel
    8287
    8388cd /tmp
    84 tar cf $TARGET.tar $TARGET
     89tar cf "$TARGET".tar "$TARGET"
    8590
    86 if [ ! -d $SAGE_ROOT/dist ]; then
    87     mkdir $SAGE_ROOT/dist
    88 fi
     91mkdir -p "$SAGE_ROOT"/dist
    8992
    90 if [ -d $SAGE_ROOT/dist/$TARGET ]; then
    91     rm -rf "$SAGE_ROOT/dist/$TARGET"
    92 fi
     93rm -rf "$SAGE_ROOT/dist/$TARGET"
    9394
    94 mv $TARGET $SAGE_ROOT/dist/
    95 mv $TARGET.tar $SAGE_ROOT/dist/
     95mv "$TARGET" "$SAGE_ROOT"/dist/
     96mv "$TARGET".tar "$SAGE_ROOT"/dist/
  • sage-spkg-install

    diff --git a/sage-spkg-install b/sage-spkg-install
    a b  
    22
    33CUR=`pwd`
    44
    5 TARGET="$SAGE_ROOT"/local/bin/
     5TARGET=$SAGE_ROOT/local/bin/
    66
    77if [ -d "$TARGET"/.hg ]; then
    88
     
    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-update

    diff --git a/sage-update b/sage-update
    a b  
    342342    for P in to_download:
    343343        download_file("standard/%s" % P)
    344344
    345     # Download these since the build system requires them to be
    346     # updated or we can't build correctly.
    347     os.chdir(SPKG_ROOT)
    348     download_file("install")
    349     os.system('chmod +x install')
    350     os.chdir("%s/standard/" % SPKG_ROOT)
    351     download_file("standard/deps")
    352     download_file("standard/newest_version")
    353     os.system('chmod +x newest_version')
    354 
    355345
    356346if __name__ == '__main__':
    357347    # Make sure the SAGE_ROOT variable is set.  This should always be
  • sage-upgrade

    diff --git a/sage-upgrade b/sage-upgrade
    a b  
    99sage-update "$@"
    1010ERR=$?
    1111
    12 # If an error code of 2 is received, get the heck out. User cancelled, or 
    13 # something else went very wrong. 
     12# If an error code of 2 is received, get the heck out. User cancelled, or
     13# something else went very wrong.
    1414if [ $ERR = 2 ]; then
    1515    exit 2  # user wants to cancel and not install
    1616fi
    1717
    18 # Something went wrong, but not user abort. 
     18# Something went wrong, but not user abort.
    1919if [ $ERR -ne 0 ]; then
    2020    echo "Error getting new packages!"
    2121    exit 1
     
    2323
    2424# Got all new packages, and ready to go.  Now actually do the install.
    2525
     26# First install the sage_root repo, then run the install script to do
     27# the others.
     28cd "$SAGE_ROOT"/spkg/
     29newest=$SAGE_ROOT/spkg/standard/newest_version
     30ROOT_REPO=`$newest sage_root`
     31
     32echo $ROOT_REPO
     33
     34./pipestatus "sage-spkg $ROOT_REPO 2>&1" "tee -a '$SAGE_ROOT'/spkg/logs/$ROOT_REPO.log"
     35
     36if [ $? -ne 0 ]; then
     37    echo "Error installing Sage root repository."
     38    exit 1
     39fi
     40
    2641# Tell the install script to force rebuilding all dependent packages, too:
    2742export SAGE_UPGRADING=yes
    2843
    29 cd "$SAGE_ROOT"/spkg/
    30 
    3144./install
    3245
    3346# Something went very wrong.
     
    3548    echo "Error installing Sage!"
    3649    exit 1
    3750fi
    38