Allen Hebert writes:
> I am looking for a front-end to package that will have similar
> features to the following:

This is the script we use to invoke package.  It eliminates the
requirement for separate 'package' files for each host.

I wish mpp was a little more versatile, however.  I could use cpp, but
then the "#" can't be used for comments.

-Rick

#!/bin/csh

if ( "$1" == "-really" ) then
  set action = ""
else
  set action = "-noaction"
endif

set mpp = /usr/afsws/etc/mpp
set packagedir = /afs/msc.cornell.edu/wsadmin/package
set template = $packagedir/@sys/main
set host = `hostname`
set tmpfile = /tmp/package.in.$$
set oslevel = `$packagedir/oslevel`

$mpp -DHOST_$host -Doslevel=$oslevel $template >$tmpfile
if ( $status == 0 ) then
  /usr/afsws/etc/package -overwrite -fullconf $tmpfile -verbose $action
else
  echo Preprocessor errors.  Exiting without invoking package.
endif
if ( "$1" == "-really" ) then
  rm $tmpfile
endif


-- 
|Rick Cochran                                                607-255-7223|
|Cornell Materials Science Center                    [EMAIL PROTECTED]|
|E20 Clark Hall, Ithaca, N.Y. 14853          cornell!msc.cornell.edu!rick|


Reply via email to