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 /config/trunk/install.sh
ViewVC logotype

Diff of /config/trunk/install.sh

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

revision 573, Thu Mar 9 15:23:52 2000 UTC revision 653, Wed Jun 7 07:59:06 2000 UTC
# Line 9  Line 9 
9  # by M.Blume (2/2000).  # by M.Blume (2/2000).
10  #  #
11    
12    this=$0
13    
14  #  #
15  # get the target list  # get the target list
16  #  #
17  if [ ! -r config/targets ]; then  if [ ! -r config/targets ]; then
18      echo "!!! File config/targets is missing."      echo "$this: !!! File config/targets is missing."
19      exit 1      exit 1
20  fi  fi
21  . config/targets  . config/targets
# Line 22  Line 24 
24  # create the preloads.standard file  # create the preloads.standard file
25  #  #
26  if [ ! -r config/preloads ]; then  if [ ! -r config/preloads ]; then
27      echo "!!! File config/preloads is missing."      echo "$this: !!! File config/preloads is missing."
28      exit 1      exit 1
29  fi  fi
30  cp config/preloads preloads.standard  cp config/preloads preloads.standard
# Line 34  Line 36 
36  MAKE=make  MAKE=make
37    
38  SHELL=/bin/sh  SHELL=/bin/sh
39  echo Using shell $SHELL.  echo $this: Using shell $SHELL.
40    
41  #  #
42  # set the SML root directory  # set the SML root directory
43  #  #
44  REAL_PWD=`pwd`  REAL_PWD=`pwd`
45  ROOT=${PWD:-$REAL_PWD}  ROOT=${PWD:-$REAL_PWD}
46  echo SML root is $ROOT.  echo $this: SML root is $ROOT.
47  echo Installation directory is ${INSTALLDIR:=$ROOT}.  echo $this: Installation directory is ${INSTALLDIR:=$ROOT}.
48    
49  #  #
50  # set the various directory and file pathname variables  # set the various directory and file pathname variables
# Line 65  Line 67 
67  TOOLDIR=$BINDIR  TOOLDIR=$BINDIR
68    
69  #  #
70    # A temporary file for post-editing the pathconfig file...
71    #
72    PCEDITTMP=/usr/tmp/pcedittmp.$$
73    
74    #
75  # files to be deleted after we are done...  # files to be deleted after we are done...
76  #  #
77  tmpfiles=""  tmpfiles=""
# Line 72  Line 79 
79  tmpfiles="$tmpfiles $LIBLIST"  tmpfiles="$tmpfiles $LIBLIST"
80  tmpfiles="$tmpfiles $LOCALPATHCONFIG"  tmpfiles="$tmpfiles $LOCALPATHCONFIG"
81  tmpfiles="$tmpfiles $LIBMOVESCRIPT"  tmpfiles="$tmpfiles $LIBMOVESCRIPT"
82    tmpfiles="$tmpfiles $PCEDITTMP"
83  #  #
84  # make sure we always clean up after ourselves...  # make sure we always clean up after ourselves...
85  #  #
# Line 90  Line 98 
98  # the release version that we are installing  # the release version that we are installing
99  #  #
100  VERSION=`cat $CONFIGDIR/version`  VERSION=`cat $CONFIGDIR/version`
101  echo Installing version $VERSION.  echo $this: Installing version $VERSION.
102    
103  #  #
104  # the URL for the (usually remote) source archive  # the URL for the (usually remote) source archive
105  #  #
106  SRCARCHIVEURL=`cat $CONFIGDIR/srcarchiveurl`  SRCARCHIVEURL=`cat $CONFIGDIR/srcarchiveurl`
107  echo URL of source archive is $SRCARCHIVEURL.  echo $this: URL of source archive is $SRCARCHIVEURL.
108    
109  #  #
110  # Function to make a directory (and advertise such action).  # Function to make a directory (and advertise such action).
111  #  #
112  makedir() {  makedir() {
113      if [ ! -d $1 ] ; then      if [ ! -d $1 ] ; then
114          echo Making directory $1          echo $this: Making directory $1
115          if mkdir $1 ; then          if mkdir $1 ; then
116              : everything is fine              : everything is fine
117          else          else
118              echo "!!! Unable to make directory $1!"              echo "$this: !!! Unable to make directory $1!"
119              exit 1              exit 1
120          fi          fi
121      fi      fi
# Line 120  Line 128 
128  #   $3 - remote directory  #   $3 - remote directory
129  #  #
130  askurl() {  askurl() {
131      echo Please, fetch $1 archive '('$VERSION-$2.'*)' from      echo "$this: Please, fetch $1 archive"
132      echo '  ' $3      echo ' ('$2.'*' or $VERSION-$2.'*)'
133        echo " from $3"
134      echo "and then re-run this script!"      echo "and then re-run this script!"
135      exit 1      exit 1
136  }  }
# Line 130  Line 139 
139  # Function for fetching source archives automatically using wget or lynx.  # Function for fetching source archives automatically using wget or lynx.
140  #   $1 - command to actually get the stuff  #   $1 - command to actually get the stuff
141  #   $2 - descriptive name  #   $2 - descriptive name
142  #   $3 - base name without extension, without version, and without dir  #   $3 - base name without extension and without dir
143  #   $4 - remote directory  #   $4 - remote directory
144  #  #
145  fetchurl() {  fetchurl() {
146      getter=$1 ; shift      getter=$1 ; shift
147      echo Fetching $1 from $2. Please stand by...      echo $this: Fetching $1 from $3. Please stand by...
148      fetched=no      fetched=no
149      for ext in tgz tar.gz tar.Z tz tar tar.bz2 ; do      for base in $2 $VERSION-$2 ; do
150          try=$VERSION-$2.$ext          for ext in tar.gz tgz tar.Z tz tar tar.bz2 ; do
151          echo Trying $try ...              try=$base.$ext
152                echo $this: Trying $try ...
153          if $getter $3 $try $ROOT/$try ; then          if $getter $3 $try $ROOT/$try ; then
154              fetched=yes              fetched=yes
155              echo Success.                  echo $this: Fetching $try was a success.
156              break                  break 2         # get out of both for-loops
157          else          else
158              rm -f $ROOT/$try              rm -f $ROOT/$try
159          fi          fi
160      done      done
161        done
162      if [ $fetched = no ] ; then      if [ $fetched = no ] ; then
163          echo No success.  You should try to do it manually now.          echo $this: Fetching $try was no success.
164            echo '  ' You should try to do it manually now.
165          askurl "$1" "$2" "$3"          askurl "$1" "$2" "$3"
166      fi      fi
167  }  }
# Line 182  Line 194 
194      fi      fi
195  }  }
196    
197    un_tar() {
198        echo "$this: Un-TAR-ing $1 archive."
199        tar -xf $2
200    }
201    
202    un_tar_Z() {
203        echo "$this: Un-COMPRESS-ing and un-TAR-ing $1 archive."
204        zcat $2 | tar -xf -
205    }
206    
207    un_tar_gz() {
208        echo "$this: Un-GZIP-ing and un-TAR-ing $1 archive."
209        gunzip -c $2 | tar -xf -
210    }
211    
212    un_tar_bz2() {
213        echo "$this: Un-BZIP2-ing and un-TAR-ing $1 archive."
214        bunzip2 -c $2 | tar -xf -
215    }
216    
217    unarchive() {
218        # $1: descriptive string, $2: archive, $3: unpacker
219        if [ -r $ROOT/$2 ] ; then
220            $3 "$1" $ROOT/$2
221        elif [ -r $ROOT/$VERSION-$2 ]; then
222            $3 "$1" $ROOT/$VERSION-$2
223        else
224            return 1
225        fi
226    }
227    
228  #  #
229  # Function to unpack a source archive.  # Function to unpack a source archive.
230  #  #
# Line 193  Line 236 
236  #     be used)  #     be used)
237  #  #
238  # fetch_n_unpack is the helper function that does the real work.  If  # fetch_n_unpack is the helper function that does the real work.  If
239  # on archive is found locally, it invokes $URLGETTER and tries again.  # no archive is found locally, it invokes $URLGETTER and tries again.
240  # The variable $tryfetch is used to make sure this happens only once.  # The variable $tryfetch is used to make sure this happens only once.
241  fetch_n_unpack() {  fetch_n_unpack() {
     larc=$ROOT/$VERSION-$4  
242      cd $2      cd $2
243      if [ -r $larc.tar.Z ] ; then      if unarchive "$1" $4.tar.gz un_tar_gz ||
244          echo "Un-compress-ing and un-tar-ing $1 archive."         unarchive "$1" $4.tgz un_tar_gz ||
245          zcat $larc.tar.Z | tar -xf -         unarchive "$1" $4.tar.Z un_tar_Z ||
246      elif [ -r $larc.tar ] ; then         unarchive "$1" $4.tar un_tar ||
247          echo "Un-tar-ing $1 archive."         unarchive "$1" $4.tar.bz1 un_tar_bz2 ||
248          tar -xf $larc.tar         unarchive "$1" $4.tz un_tar_Z
249      elif [ -r $larc.tar.gz ] ; then      then
250          echo "Un-gzip-ing and un-tar-ing $1 archive."          : we are done
         gunzip -c $larc.tar.gz | tar -xf -  
     elif [ -r $larc.tar.bz2 ] ; then  
         echo "Un-bzip2-ing and un-tar-ing $1 archive."  
         bunzip2 -c $larc.tar.bz2 | tar -xf -  
     elif [ -r $larc.tgz ] ; then  
         echo "Un-gzip-ing and un-tar-ing $1 archive."  
         gunzip -c $larc.tgz | tar -xf -  
     elif [ -r $larc.tz ] ; then  
         echo "Un-compress-ing and un-tar-ing $1 archive."  
         zcat $larc.tz | tar -xf -  
251      elif [ $tryfetch = yes ] ; then      elif [ $tryfetch = yes ] ; then
252          urlgetter          urlgetter
253          $URLGETTER "$1" $4 $SRCARCHIVEURL          $URLGETTER "$1" $4 $SRCARCHIVEURL
# Line 230  Line 262 
262  unpack() {  unpack() {
263      tryfetch=yes      tryfetch=yes
264      if [ -d $2/$3 ]; then      if [ -d $2/$3 ]; then
265          echo "The $1 tree already exists."          echo "$this: The $1 tree already exists."
266      else      else
267          fetch_n_unpack "$1" "$2" "$3" "$4"          fetch_n_unpack "$1" "$2" "$3" "$4"
268      fi      fi
269      if [ ! -d $2/$3 ]; then      if [ ! -d $2/$3 ]; then
270          echo "!!! Unable to unpack $1 archive."          echo "$this: !!! Unable to unpack $1 archive."
271          exit 1          exit 1
272      fi      fi
273  }  }
# Line 248  Line 280 
280      if [ -d $1 ] ; then      if [ -d $1 ] ; then
281          if [ ! -d $2 ] ; then          if [ ! -d $2 ] ; then
282              if [ -f $2 ] ; then              if [ -f $2 ] ; then
283                  echo install.sh: $2 exists as a non-directory.                  echo $this: $2 exists as a non-directory.
284                  exit 1                  exit 1
285              fi              fi
286              mkdir $2              mkdir $2
# Line 280  Line 312 
312          case $lib in          case $lib in
313          *.cm | *.cmi)          *.cm | *.cmi)
314              if [ $lib != $2 ] ; then              if [ $lib != $2 ] ; then
315                  echo "! Warning:" $lib specified relative to $2                  echo "$this: Warning:" $lib specified relative to $2
316              fi              fi
317              echo Moving library $lib to $LIBDIR              echo $this: Moving library $lib to $LIBDIR
318              makedir $LIBDIR/$2              makedir $LIBDIR/$2
319              makedir $LIBDIR/$2/CM              makedir $LIBDIR/$2/CM
320              makedir $LIBDIR/$2/CM/$ARCH-unix              makedir $LIBDIR/$2/CM/$ARCH-unix
# Line 308  Line 340 
340  reglib() {  reglib() {
341      if [ x$MOVE_LIBRARIES = xtrue ] ; then      if [ x$MOVE_LIBRARIES = xtrue ] ; then
342          FINALLOCATION=$LIBDIR/$1          FINALLOCATION=$LIBDIR/$1
343            FINALCONFIGPATH=$1
344      else      else
345          FINALLOCATION=$SRCDIR/$2          FINALLOCATION=$SRCDIR/$2
346            FINALCONFIGPATH=$FINALLOCATION
347      fi      fi
348      if [ -d $FINALLOCATION/CM/$ARCH-unix ] ; then      if [ -d $FINALLOCATION/CM/$ARCH-unix ] ; then
349          echo "Library $1 already exists in $FINALLOCATION."          echo "$this: Library $1 already exists in $FINALLOCATION."
350      else      else
351          echo "Scheduling library $1 to be built in $FINALLOCATION."          echo "$this: Scheduling library $1 to be built in $FINALLOCATION."
352          echo "andalso CM.stabilize false \"$1\"" >>$LIBLIST          echo "  andalso CM.stabilize false \"\$/$1\"" >>$LIBLIST
353          echo $1 $SRCDIR/$2 >>$LOCALPATHCONFIG          echo $1 $SRCDIR/$2 >>$LOCALPATHCONFIG
354          if [ x$MOVE_LIBRARIES = xtrue ] ; then          if [ x$MOVE_LIBRARIES = xtrue ] ; then
355              echo movelibs $SRCDIR/$2 $1 >>$LIBMOVESCRIPT              echo movelibs $SRCDIR/$2 $1 >>$LIBMOVESCRIPT
356          fi          fi
         echo $1 $FINALLOCATION >>$CM_PATHCONFIG_DEFAULT  
357      fi      fi
358        echo $1 $FINALCONFIGPATH >>$CM_PATHCONFIG_DEFAULT
359  }  }
360    
361  #  #
# Line 341  Line 375 
375          TARGETLOC=$TARGET          TARGETLOC=$TARGET
376      fi      fi
377      if [ -r $HEAPDIR/$TARGET ] ; then      if [ -r $HEAPDIR/$TARGET ] ; then
378          echo Target $TARGET already exists.          echo $this: Target $TARGET already exists.
379      else      else
380          echo Building $TARGET.          echo $this: Building $TARGET.
381          unpack $2 $SRCDIR $1 $1          unpack $2 $SRCDIR $1 $1
382          cd $SRCDIR/$1          cd $SRCDIR/$1
383          ./build          ./build
# Line 354  Line 388 
388                  ln -s .run-sml $1                  ln -s .run-sml $1
389              fi              fi
390          else          else
391              echo "!!! Build of $TARGET failed."              echo "$this: !!! Build of $TARGET failed."
392          fi          fi
393      fi      fi
394  }  }
# Line 362  Line 396 
396  #  #
397  # create the various sub directories  # create the various sub directories
398  #  #
399  for dir in $BINDIR $HEAPDIR $RUNDIR $LIBDIR $SRCDIR  for dir in $BINDIR $HEAPDIR $RUNDIR $LIBDIR $SRCDIR ; do
 do  
400      makedir $dir      makedir $dir
401  done  done
402    
# Line 371  Line 404 
404  # install the script that tests the architecture, and make sure that it works  # install the script that tests the architecture, and make sure that it works
405  #  #
406  if [ -x $BINDIR/.arch-n-opsys ]; then  if [ -x $BINDIR/.arch-n-opsys ]; then
407      echo Script $BINDIR/.arch-n-opsys already exists.      echo $this: Script $BINDIR/.arch-n-opsys already exists.
408  else  else
409      cat $CONFIGDIR/_arch-n-opsys \      cat $CONFIGDIR/_arch-n-opsys \
410      | sed -e "s,@SHELL@,$SHELL,g" > $BINDIR/.arch-n-opsys      | sed -e "s,@SHELL@,$SHELL,g" > $BINDIR/.arch-n-opsys
411      chmod 555 $BINDIR/.arch-n-opsys      chmod 555 $BINDIR/.arch-n-opsys
412      if [ ! -x $BINDIR/.arch-n-opsys ]; then      if [ ! -x $BINDIR/.arch-n-opsys ]; then
413          echo "!!! Installation of $BINDIR/.arch-n-opsys failed."          echo "$this: !!! Installation of $BINDIR/.arch-n-opsys failed."
414          exit 1          exit 1
415      fi      fi
416  fi  fi
417    
418  ARCH_N_OPSYS=`$BINDIR/.arch-n-opsys`  ARCH_N_OPSYS=`$BINDIR/.arch-n-opsys`
419  if [ "$?" != "0" ]; then  if [ "$?" != "0" ]; then
420      echo "!!! Script $BINDIR/.arch-n-opsys fails on this machine."      echo "$this: !!! Script $BINDIR/.arch-n-opsys fails on this machine."
421      echo "!!! You must patch this by hand and repeat the installation."      echo "$this: !!! You must patch this by hand and repeat the installation."
422      exit 2      exit 2
423  else  else
424      echo Script $BINDIR/.arch-n-opsys reports $ARCH_N_OPSYS.      echo $this: Script $BINDIR/.arch-n-opsys reports $ARCH_N_OPSYS.
425  fi  fi
426  eval $ARCH_N_OPSYS  eval $ARCH_N_OPSYS
427    
# Line 404  Line 437 
437  # for an outdated driver script, but not all "test" commands understand  # for an outdated driver script, but not all "test" commands understand
438  # the -nt comparison operator....)  # the -nt comparison operator....)
439  #   if [ -x $BINDIR/$ddst ]; then  #   if [ -x $BINDIR/$ddst ]; then
440  #       echo Script $BINDIR/$ddst already exists.  #       echo $this: Script $BINDIR/$ddst already exists.
441  #   else  #   else
442          rm -f $BINDIR/$ddst          rm -f $BINDIR/$ddst
443          cat $CONFIGDIR/$dsrc | \          cat $CONFIGDIR/$dsrc | \
# Line 414  Line 447 
447              > $BINDIR/$ddst              > $BINDIR/$ddst
448          chmod 555 $BINDIR/$ddst          chmod 555 $BINDIR/$ddst
449          if [ ! -x $BINDIR/$ddst ]; then          if [ ! -x $BINDIR/$ddst ]; then
450              echo "!!! Installation of $BINDIR/${ddst} failed."              echo "$this: !!! Installation of $BINDIR/${ddst} failed."
451              exit 1              exit 1
452          fi          fi
453  #   fi  #   fi
# Line 432  Line 465 
465          ALLOC=1M          ALLOC=1M
466          ;;          ;;
467      x86)      x86)
468            # The following is the _wrong_ value for many popular x86 chips
469            # (i.e., Celerons).  However, the optimal value for those is 32k,
470            # and such a small value is not enough for the runtime system's boot
471            # code.  Therefore, we use 256k here and re-set it to the proper
472            # value in .run-sml.
473          ALLOC=256k          ALLOC=256k
474          ;;          ;;
475      alpha32)      alpha32)
# Line 449  Line 487 
487      linux)      linux)
488          EXTRA_DEFS=`$CONFIGDIR/chk-global-names.sh`          EXTRA_DEFS=`$CONFIGDIR/chk-global-names.sh`
489          if [ "$?" != "0" ]; then          if [ "$?" != "0" ]; then
490              echo "!!! Problems checking for underscores in global names."              echo "$this: !!! Problems checking for underscores in asm names."
491              exit 1              exit 1
492          fi          fi
493          EXTRA_DEFS="XDEFS=$EXTRA_DEFS"          EXTRA_DEFS="XDEFS=$EXTRA_DEFS"
# Line 459  Line 497 
497  #  #
498  # the name of the bin files directory  # the name of the bin files directory
499  #  #
500  BOOT_FILES=sml.boot.$ARCH-unix  BOOT_ARCHIVE=boot.$ARCH-unix
501    BOOT_FILES=sml.$BOOT_ARCHIVE
502    
503  #  #
504  # build the run-time system  # build the run-time system
505  #  #
506  unpack "run-time" $SRCDIR runtime runtime  unpack "run-time" $SRCDIR runtime runtime
507  if [ -x $RUNDIR/run.$ARCH-$OPSYS ]; then  if [ -x $RUNDIR/run.$ARCH-$OPSYS ]; then
508      echo Run-time system already exists.      echo $this: Run-time system already exists.
509  else  else
510      cd $SRCDIR/runtime/objs      cd $SRCDIR/runtime/objs
511      echo Compiling the run-time system.      echo $this: Compiling the run-time system.
512      $MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS      $MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS
513      if [ -x run.$ARCH-$OPSYS ]; then      if [ -x run.$ARCH-$OPSYS ]; then
514          mv run.$ARCH-$OPSYS $RUNDIR          mv run.$ARCH-$OPSYS $RUNDIR
515          # $MAKE MAKE=$MAKE clean          # $MAKE MAKE=$MAKE clean
516      else      else
517          echo "!!! Run-time system build failed for some reason."          echo "$this: !!! Run-time system build failed for some reason."
518          exit 1          exit 1
519      fi      fi
520  fi  fi
# Line 485  Line 524 
524  # boot the base SML system  # boot the base SML system
525  #  #
526  if [ -r $HEAPDIR/sml.$HEAP_SUFFIX ]; then  if [ -r $HEAPDIR/sml.$HEAP_SUFFIX ]; then
527      echo Heap image $HEAPDIR/sml.$HEAP_SUFFIX already exists.      echo $this: Heap image $HEAPDIR/sml.$HEAP_SUFFIX already exists.
528  else  else
529      unpack bin $ROOT $BOOT_FILES $BOOT_FILES      unpack bin $ROOT $BOOT_FILES $BOOT_ARCHIVE
530      cd $ROOT/$BOOT_FILES      cd $ROOT/$BOOT_FILES
531      if $BINDIR/.link-sml @SMLheap=$ROOT/sml @SMLboot=BOOTLIST @SMLalloc=$ALLOC      if $BINDIR/.link-sml @SMLheap=$ROOT/sml @SMLboot=BOOTLIST @SMLalloc=$ALLOC
532      then      then
# Line 512  Line 551 
551              rm -rf $BOOT_FILES              rm -rf $BOOT_FILES
552    
553          else          else
554              echo "!!! Boot code did not produce heap image (sml.$HEAP_SUFFIX)."              echo "$this !!! No heap image generated (sml.$HEAP_SUFFIX)."
555              exit 1              exit 1
556          fi          fi
557      else      else
558          echo "!!! Boot code failed, no heap image built (sml.$HEAP_SUFFIX)."          echo "$this !!! Boot code failed, no heap image (sml.$HEAP_SUFFIX)."
559          exit 1          exit 1
560      fi      fi
561  fi  fi
# Line 526  Line 565 
565  #  #
566  cd $ROOT  cd $ROOT
567  rm -f $LOCALPATHCONFIG $LIBLIST  rm -f $LOCALPATHCONFIG $LIBLIST
568  echo 'OS.Process.exit (if true' >$LIBLIST  echo 'ignore (OS.Process.exit (if true' >$LIBLIST
569    
570  #  #
571  # now build (or prepare to build) the individual targets  # now build (or prepare to build) the individual targets
572  #  #
573  cd $SRCDIR  cd $SRCDIR
574  echo Installing other targets.  echo $this: Installing other targets.
575  for i in $TARGETS ; do  for i in $TARGETS ; do
576      case $i in      case $i in
577        src-smlnj)        src-smlnj)
# Line 592  Line 631 
631          build $ROOT          build $ROOT
632          ;;          ;;
633        *)        *)
634          echo "!!! Unknown target $i."          echo "$this: !!! Unknown target $i."
635          ;;          ;;
636      esac      esac
637  done  done
# Line 603  Line 642 
642  # $SRCDIR, so we must consult $LOCALPATHCONFIG.  # $SRCDIR, so we must consult $LOCALPATHCONFIG.
643  #  #
644    
645  echo Compiling library code.  echo $this: Compiling library code.
646  echo 'then OS.Process.success else OS.Process.failure);' >>$LIBLIST  echo 'then OS.Process.success else OS.Process.failure));' >>$LIBLIST
647  if CM_LOCAL_PATHCONFIG=$LOCALPATHCONFIG $BINDIR/sml <$LIBLIST ; then  if CM_LOCAL_PATHCONFIG=$LOCALPATHCONFIG $BINDIR/sml <$LIBLIST ; then
648      echo Libraries compiled successfully.      echo $this: Libraries compiled successfully.
649  else  else
650      echo "!!! Something went wrong when compiling the libraries."      echo "$this: !!! Something went wrong when compiling the libraries."
651      exit 1      exit 1
652  fi  fi
653    
654  #  #
655  # Finally, move the libraries to their final locations...  # Move the libraries to their final locations...
656  #  #
657    
658  if [ -r $LIBMOVESCRIPT ] ; then  if [ -r $LIBMOVESCRIPT ] ; then
659      echo Moving libraries to $LIBDIR.      echo $this: Moving libraries to $LIBDIR.
660      . $LIBMOVESCRIPT      . $LIBMOVESCRIPT
661  fi  fi
662    
663    #
664    # Finally, remove duplicate entries from pathconfig file...
665    #
666    if [ -f $CM_PATHCONFIG_DEFAULT ] ; then
667        cp $CM_PATHCONFIG_DEFAULT $PCEDITTMP
668        rm -f $CM_PATHCONFIG_DEFAULT
669        awk <$PCEDITTMP 'NF == 2 { mapping[$1] = $2 }
670    NF != 2 { print $0 }
671    END { for (i in mapping) print i, mapping[i] }' \
672          | sort >$CM_PATHCONFIG_DEFAULT
673    fi
674    
675  exit 0  exit 0

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

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