Ticket #9433: root-spkg-install

File root-spkg-install, 997 bytes (added by jhpalmieri, 9 years ago)

the file SAGE_ROOT/spkg/root-spkg-install

Line 
1#!/usr/bin/env bash
2
3# spkg-install file for sage root repo.
4
5# This should only get run during an upgrade -- see the script
6# sage-upgrade -- not a build from source.  The sage_root spkg file
7# should not appear in spkg/standard/deps.
8
9CUR=`pwd`
10
11TARGET="$SAGE_ROOT"
12
13if [ -d "$TARGET"/.hg ]; then
14
15    # Merge the repository, rather than overwrite changes that the
16    # user may have made.
17    cd "$TARGET"
18    hg ci
19    hg pull "$CUR"
20    hg merge tip
21    hg ci -m "Check-in during upgrade of Sage."
22    hg update
23
24else
25
26    # Initial install.  Just copy all the files over.
27    cp -rp .hg* COPYING.txt README.txt sage ipython "$TARGET"
28    if [ -f makefile ]; then
29        cp makefile "$TARGET"/Makefile
30    else
31        cp Makefile "$TARGET"
32    fi
33    mkdir -p "$TARGET/spkg"
34    mkdir -p "$TARGET/spkg/standard"
35    cd spkg
36    cp README.txt gen_html install pipestatus root-spkg-install "$TARGET/spkg"
37    cd standard
38    cp README.txt deps libdist_filelist newest_version "$TARGET/spkg/standard"
39
40fi