#!/usr/local/bin/perl # # -*- Perl -*- # # Dispatch the URL to one of the filter programs that makes up the DODS # server. The filter program is executed by this script using exec. If the # filter program cannot be run, return an error message. # # See the DODS_Dispatch.pm class for information about how environment # variables are used. # # NB: This script assumes that all data is rooted in the http document # directory subtree. If you want to access files outside that subtree, use a # symbolic link and make sure that your server is set to follow symbolic # links. To configure your server to follow symbolic links, add # FollowSymLinks to the Options in the access.conf file. # # $Id: nph-mat.in,v 1.2 1997/10/04 00:33:22 jimg Exp $ # # $Log: nph-mat.in,v $ # Revision 1.2 1997/10/04 00:33:22 jimg # Release 2.14c fixes # # Revision 1.1.2.1 1997/09/04 17:34:27 jimg # Created from nph-mat. # # Revision 1.8 1997/06/12 21:04:45 jimg # Removed the DODS_ROOT environment variable. # # Revision 1.7 1997/06/06 03:55:20 jimg # Rewrote to use the new Perl DODS_Dispatch class. # use Env; use DODS_Dispatch; # Set the DODS_ROOT environment variable. This is done so that the filter # programs which do the real work of the server can find gzip when it is not # on the user's PATH but *is* in DODS_ROOT/etc. NB: The filter program # appends the `etc'. # $ENV{'DODS_ROOT'} = "/usr/local/DODS-2.13"; NOT USED # Set the library path to point to the sharable libraries used by matlab. $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:/usr/local/matlab/extern/lib/alpha"; # The DODS_Dispatch object reads information from the environment variables # and builds up a command based on the format of a DODS URL. $dispatch = new DODS_Dispatch; $command = $dispatch->command(); if ($command ne "") { # if no error... exec($command); } else { my $script_rev = '$Revision: 1.2 $ '; $script_rev =~ s@\$([A-z]*): (.*) \$@$2@; $dispatch->print_error_msg($script_rev); }