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 568, Tue Mar 7 03:59:09 2000 UTC revision 569, Tue Mar 7 04:01:07 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 43  Line 72 
72  # Moving each individual library...  # Moving each individual library...
73  cd $LIB_DIR  cd $LIB_DIR
74  list=`echo *.cm`  list=`echo *.cm`
 cd ..  
75  for lib in init.cmi $list ; do  for lib in init.cmi $list ; do
76      if [ -d $MAIN_LIB_DIR/$lib/CM/$ARCH-unix ] ; then      move $lib $MAIN_LIB_DIR/$lib
         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  
     fi  
77  done  done
78    cd ..
79    
80  # Update the pathconfig file in $MAIN_LIB_DIR  # Update the pathconfig file in $MAIN_LIB_DIR
81  #  The awk script below replaces the original binding in $pcfile  #  The awk script below replaces the original binding in $pcfile

Legend:
Removed from v.568  
changed lines
  Added in v.569

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