#!/bin/sh # # guacctl # # Utility for sending Guacamole-specific console codes for controlling the SSH # session, such as: # # * Downloading files # * Setting the destination directory for uploads # fullpath() { FILENAME="$1" DIR=`dirname "$FILENAME"` FILE=`basename "$FILENAME"` (cd "$DIR" && echo "$PWD/$FILE") } send_download_file() { FILENAME="$1" printf "\033]482200;%s\007" "$FILENAME" } send_set_directory() { FILENAME="$1" printf "\033]482201;%s\007" "$FILENAME" } error() { echo "$NAME:" "$@" >&2 } usage() { cat >&2 <