updated to clean up compiler issues with how functions were used from basis namespace;
[feisty_meow.git] / scripts / security / ssh.sh
1 #!/bin/bash
2
3 # wraps our calling the secure shell and lets us pick our credentials.
4
5 source "$FEISTY_MEOW_SCRIPTS/security/pick_credentials.sh"
6
7 \ssh -i "$keyfile" -X $*
8
9 if [ $? -eq 0 ]; then
10   # we don't want to emit anything extra if this is being driven by git.
11   if [ -z "$(echo $* | grep git)" ]; then
12     # re-run the terminal labeller after coming back from ssh.
13     # we check the exit value because we don't want to update this for a failed connection.
14     bash $FEISTY_MEOW_SCRIPTS/tty/label_terminal_with_infos.sh
15   fi
16 fi
17
18