#!/bin/sh editor="jed" if [ "$REMOTEHOST" == "alkes.drao.nrc.ca" ] ; then if [ "`ssh-add -l`" != "The agent has no identities." ] ; then editor="ssh alkes emacsclient" fi else if [ "`ps -u ${USER} | grep emacsserver`" != "" ] ; then editor="emacsclient" fi fi exec ${editor} $@