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 537, Fri Feb 18 17:20:16 2000 UTC revision 573, Thu Mar 9 15:23:52 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  here=`pwd`
9  MAIN_LIB_DIR=../../lib  cd ../..
10    twoup=`pwd`
11    cd $here
12    
13    MAIN_HEAP_DIR=$twoup/bin/.heap
14    MAIN_LIB_DIR=$twoup/lib
15    
16  if [ $# -gt 0 ] ; then  if [ $# -gt 0 ] ; then
17      STEM=$1      STEM=$1
# Line 24  Line 29 
29    fi    fi
30  fi  fi
31    
32    # A function to move all stable library files to a parallel directory
33    # hierarchy.
34    # The first argument must be a simple path (no / inside), and
35    # the second argument must be an absolute path.
36    move() {
37        if [ -d $1 ] ; then
38            if [ ! -d $2 ] ; then
39                if [ -f $2 ] ; then
40                    echo installml: $2 exists as a non-directory.
41                    exit 1
42                fi
43                mkdir $2
44            fi
45            cd $1
46            for i in * ; do
47                move $i $2/$i
48            done
49            cd ..
50        elif [ -f $1 ] ; then
51            rm -f $2
52            mv $1 $2
53        fi
54    }
55    
56  HEAP_FILE=$STEM.$ARCH-$OPSYS  HEAP_FILE=$STEM.$ARCH-$OPSYS
57  LIB_DIR=$STEM.lib  LIB_DIR=$STEM.lib
58    
# Line 42  Line 71 
71    
72  # Moving each individual library...  # Moving each individual library...
73  cd $LIB_DIR  cd $LIB_DIR
74  list=`echo *.cm`  for anchor in * ; do
75  cd ..      if [ -d $anchor ] ; then
76  for lib in init.cmi $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  
77      fi      fi
78  done  done
79    cd ..
80    
81  # Update the pathconfig file in $MAIN_LIB_DIR  # Update the pathconfig file in $MAIN_LIB_DIR
82  #  The awk script below replaces the original binding in $pcfile  #  The awk script below replaces the original binding in $pcfile

Legend:
Removed from v.537  
changed lines
  Added in v.573

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