[63] in mathematical software users group

home help back first fref pref prev next nref lref last post

library-buster for Maple V release 2

daemon@ATHENA.MIT.EDU (Reid M. Pinchback)
Tue Jan 12 13:37:22 1993

To: msug@MIT.EDU
Date: Tue, 12 Jan 93 13:36:30 EST
From: "Reid M. Pinchback" <reidmp@Athena.MIT.EDU>


For anybody out there who has recently gotten Maple V release 2, you
might have noticed that the library is no longer distributed as a bunch
of small files, but instead as one large file.  For some environments
the latter is better, but for some it isn't.  It also isn't convenient
for the idly curious who are interested in poking around in the internals 
of Maple.  With some help from the Maple folks, I've written a nawk script
that will split up the library archive into a directory hierarchy again.
To use it, have lots of diskspace and run the script from the directory
*above* the "lib" directory; it should work on any Un*x system that has
"nawk" and that has a "-p" option on "mkdir" for creating paths of
directories.


#!/bin/sh
cd lib
march -l . | nawk '{
  # find where the filename starts
  filepos = match($NF, /[^\/]+$/)
  # extract the pathname
  pathname = substr($NF, 1, filepos-1)
  # extract the filename
  filename = substr($NF, filepos)
  if (filepos != 1) { # then there was an initial path
    system("mkdir -p " pathname " 2> /dev/null")
  }
  system("march -x . " $NF " " $NF)
  print $NF
}' -


The "march" program is a utility that the Maple folks now distribute
to help you maintain Maple library archives; make sure it can be found
in your path before trying to run the script.

Note that breaking up the files doesn't cause Maple to stop using the
original large archive files (maple.lib and maple.ind); you would have
to move them out of the lib directory in order to get Maple to stop
using them.

-----------
Reid M. Pinchback
Faculty Liaison
Academic Computing Services, MIT

home help back first fref pref prev next nref lref last post