#!/bin/bash module_load ssh module_load bundle module_load helpers module_load ssh-copy remote_function () { [[ $2 ]] && module_load $2 if declare -f $1; then local file file=$(mkrfilename function) $(declare -f $1) > $file echo $file else >&2 echo fatal: unable to source funtion $1, aborting return 1 fi } remote_script () { local sshargs;local user;local supass;local cfn; local rfn; local args; local script; local host; local dr; local supass; local env_vars; local login; local slogin local hostname; local bscript; local ruser; local usesudo; local save help() { cat < host script