diff --git a/bin/guacctl b/bin/guacctl index 1d4f70a5..c6210405 100755 --- a/bin/guacctl +++ b/bin/guacctl @@ -44,7 +44,14 @@ # * Downloading files # * Setting the destination directory for uploads # +# This script may also be run as "guacget", in which case the script accepts +# no options and assumes anything given on the commandline is a file to be +# downloaded. +# + +# Given the name of a file, which may be a relative path, produce the full, +# real, non-relative path for that same file. fullpath() { FILENAME="$1" DIR=`dirname "$FILENAME"` @@ -52,32 +59,44 @@ fullpath() { (cd "$DIR" && echo "$PWD/$FILE") } +# Sends the Guacamole-specific console code for initiating a download. send_download_file() { FILENAME="$1" printf "\033]482200;%s\007" "$FILENAME" } +# Sends the Guacamole-specific console code for setting the upload directory. send_set_directory() { FILENAME="$1" printf "\033]482201;%s\007" "$FILENAME" } +# Prints the given error text to STDERR. error() { echo "$NAME:" "$@" >&2 } +# Prints usage documentation for this script. usage() { cat >&2 <