#!/bin/sh
# ----------------------------------------------------------------------
#  USAGE: importfile ?options? ?--label text? file file ...
#
#    options:
#      -h or --help
#        Prints a help message.
#
#      -f or --for <text>
#        Short explanation of what the data will be used for; for
#        example, "for CNTBands 2.0".  If given, this text is inserted
#        into the upload form to help explain what it will be used for.
#
#      -l or --label <text>
#        Prompt for subsequent file arguments using this label string.
#        The default label just uses the file name.
#
#      --
#        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
#  desktop into their session.  This works a lot like a download
#  operation (see exportfile command) but the file downloaded is
#  merely a form that the user can use to upload information.  This
#  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 the
#  upload form on the user's desktop.  The user then chooses one
#  or more files and posts the results back to the server, which
#  stores the files in the specified names and then notifies this
#  client that they are ready.
#
# ======================================================================
#  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/importfile.tcl "$@"
