#!/bin/bash # FIXME: Calls are not supported from everywhere yet, so workaround it this way. if [ "$HOSTNAME" != panda ]; then exec ssh panda ~/bin/exo "$@" fi # Assuming we're on panda NODE='exo@10.1.3.29' # FIXME: Merge this with the (much more complicated) ~/exo/bin/rpc_call.escript [ -z "$2" ] && echo "usage: $0 [ ...]" && exit 1 # Only available from hosts that have the cookie export EXO_COOKIE=$(cat ~/.pw/exo_cookie) [ -z "$EXO_COOKIE" ] && echo "no EXO_COOKIE" >&2 && exit 1 # The Erlang function should return some text that is easy to parse, # e.g. a list which each item on its own line, or an executable # script, or whatever makes sense in a particular situation. Printing # is easier than parsing. Keep complexity on the Erlang side. $(dirname $0)/exo_call.escript $NODE "$@"