Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/system/installml
ViewVC logotype

Diff of /sml/trunk/src/system/installml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 512, Mon Dec 13 05:43:09 1999 UTC revision 577, Fri Mar 10 08:07:18 2000 UTC
# Line 5  Line 5 
5    
6  trap 'rm -f $tmpfile; exit 1' 0 1 2 3 15  trap 'rm -f $tmpfile; exit 1' 0 1 2 3 15
7    
8  MAIN_HEAP_DIR=../../bin/.heap  this=$0
9  MAIN_LIB_DIR=../../lib  here=`pwd`
10    cd ../..
11    twoup=`pwd`
12    cd $here
13    
14    MAIN_HEAP_DIR=$twoup/bin/.heap
15    MAIN_LIB_DIR=$twoup/lib
16    
17  if [ $# -gt 0 ] ; then  if [ $# -gt 0 ] ; then
18      STEM=$1      STEM=$1
# Line 19  Line 25 
25    if [ "$?" = "0" ]; then    if [ "$?" = "0" ]; then
26      eval $ARCH_N_OPSYS      eval $ARCH_N_OPSYS
27    else    else
28      echo "Cannot determine architecture/os."      echo "$this: Cannot determine architecture/os."
29      exit 1      exit 1
30    fi    fi
31  fi  fi
32    
33    # A function to move all stable library files to a parallel directory
34    # hierarchy.
35    # The first argument must be a simple path (no / inside), and
36    # the second argument must be an absolute path.
37    move() {
38        if [ -d $1 ] ; then
39            if [ ! -d $2 ] ; then
40                if [ -f $2 ] ; then
41                    echo $this: $2 exists as a non-directory.
42                    exit 1
43                fi
44                mkdir $2
45            fi
46            cd $1
47            for i in * ; do
48                move $i $2/$i
49            done
50            cd ..
51        elif [ -f $1 ] ; then
52            rm -f $2
53            mv $1 $2
54        fi
55    }
56    
57  HEAP_FILE=$STEM.$ARCH-$OPSYS  HEAP_FILE=$STEM.$ARCH-$OPSYS
58  LIB_DIR=$STEM.lib  LIB_DIR=$STEM.lib
59    
60  if [ ! -f $HEAP_FILE ] ; then  if [ ! -f $HEAP_FILE ] ; then
61      echo "The heap file $HEAP_FILE is missing."      echo "$this: The heap file $HEAP_FILE is missing."
62      exit 1      exit 1
63  fi  fi
64    
65  if [ ! -d $LIB_DIR ] ; then  if [ ! -d $LIB_DIR ] ; then
66      echo "The library directory $LIB_DIR is missing."      echo "$this: The library directory $LIB_DIR is missing."
67      exit 1      exit 1
68  fi  fi
69    
# Line 42  Line 72 
72    
73  # Moving each individual library...  # Moving each individual library...
74  cd $LIB_DIR  cd $LIB_DIR
75  list=`echo *.cm`  for anchor in * ; do
76  cd ..      if [ -d $anchor ] ; then
77  for lib in $list ; do          move $anchor $MAIN_LIB_DIR/$anchor
     if [ -d $MAIN_LIB_DIR/$lib/CM/$ARCH-unix ] ; then  
         rm -r $MAIN_LIB_DIR/$lib/CM/$ARCH-unix  
     fi  
     # Be careful not to clobber libraries for other architectures...  
     if [ -d $MAIN_LIB_DIR/$lib ] ; then  
         if [ -d $MAIN_LIB_DIR/$lib/CM ] ; then  
             mv $LIB_DIR/$lib/CM/$ARCH-unix $MAIN_LIB_DIR/$lib/CM/$ARCH-unix  
         else  
             mv $LIB_DIR/$lib/CM $MAIN_LIB_DIR/$lib/CM  
         fi  
     else  
         mv $LIB_DIR/$lib $MAIN_LIB_DIR/$lib  
78      fi      fi
79  done  done
80    cd ..
81    
82  # Update the pathconfig file in $MAIN_LIB_DIR  # Update the pathconfig file in $MAIN_LIB_DIR
83  #  The awk script below replaces the original binding in $pcfile  #  The awk script below replaces the original binding in $pcfile

Legend:
Removed from v.512  
changed lines
  Added in v.577

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0