diff --git a/bin/guacctl b/bin/guacctl index 252c8c4d..e1cc1bec 100755 --- a/bin/guacctl +++ b/bin/guacctl @@ -37,9 +37,13 @@ # downloaded. # - -# Given the name of a file, which may be a relative path, produce the full, -# real, non-relative path for that same file. +## +## Given the name of a file, which may be a relative path, produce the full, +## real, non-relative path for that same file. +## +## @param FILENAME +## The name of the file to produce the full path of. +## fullpath() { FILENAME="$1" DIR=`dirname "$FILENAME"` @@ -47,37 +51,61 @@ fullpath() { (cd "$DIR" && echo "$PWD/$FILE") } -# Sends the Guacamole-specific console code for initiating a download. +## +## Sends the Guacamole-specific console code for initiating a download. +## +## @param FILENAME +## The full path of the file to download. +## send_download_file() { FILENAME="$1" printf "\033]482200;%s\007" "$FILENAME" } -# Sends the Guacamole-specific console code for setting the upload directory. +## +## Sends the Guacamole-specific console code for setting the upload directory. +## +## @param FILENAME +## The full path to the directory which should receive uploads. +## send_set_directory() { FILENAME="$1" printf "\033]482201;%s\007" "$FILENAME" } -# Sends the Guacamole-specific console code for redirecting output to a named -# pipe stream (instead of the terminal emulator) +## +## Sends the Guacamole-specific console code for redirecting output to a named +## pipe stream (instead of the terminal emulator) +## +## @param NAME +## The name of the pipe stream to open. +## send_open_pipe_stream() { NAME="$1" printf "\033]482202;%s\007" "$NAME" } -# Sends the Guacamole-specific console code for redirecting output back to the -# terminal emulator +## +## Sends the Guacamole-specific console code for redirecting output back to the +## terminal emulator +## send_close_pipe_stream() { printf "\033]482203\007" } -# Prints the given error text to STDERR. +## +## Prints the given error text to STDERR. +## +## @param ... +## The text to print as an error message. +## error() { echo "$NAME:" "$@" >&2 } -# Prints usage documentation for this script. +## +## Prints usage documentation for this script. +## usage() { cat >&2 <