#!/bin/sh
# ----------------------------------------------------------------------
#  USAGE: exportfile ?options? file file ...
#
#    options:
#      -h or --help
#        Prints a help message.
#
#      -t or --timeout <seconds>
#        Forget about the file after this timeout.  Default is 300
#        seconds (5 mins).
#
#      -d or --delete
#        Delete the file after the timeout or when the server is shut
#        down.
#
#      -m or --message
#        File containing a fragment of HTML text that will be displayed
#        above the download.  It might say "Here is your data," or
#        "If you use this data, please cite this source."
#
#      -f or --format <type>
#        Choices are "raw" and "html".  Default is "raw".  The "html"
#        format causes the server to rewrite links embedded within
#        the HTML, so that images can be displayed and links can be
#        traversed properly.
#
#      --
#        Remaining arguments are treated as file names, even if they
#        start with a -.
#
#  This is the client that users invoke to transfer files from their
#  session to their desktop.  The client tries to connect to a server
#  to handle the transfer.  If necessary, the client tries to spawn
#  the server and then connect to it.  The server uses the "clientaction"
#  program to open a web page on the client's desktop to download the
#  file.
#
#  Note that the file can be any file in the user's home directory,
#  and therefore is not deleted unless specifically instructed to do
#  so via the --delete option.
# ======================================================================
#  AUTHOR:  Michael McLennan, Purdue University
#  Copyright (c) 2004-2007  Purdue Research Foundation
#
#  See the file "license.terms" for information on usage and
#  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# ======================================================================
#\
export PATH=/apps/rappture/current/bin:${PATH}
#\
export TCLLIBPATH=/apps/rappture/current/lib
. rappture.env
#\
exec tclsh /apps/filexfer/exportfile.tcl "$@"
