fixed custom scripts issue, so now the custom folder for a user can have a "scripts...
[feisty_meow.git] / customizing / fred / scripts / 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 if [ ! -z "$keyfile" ]; then
8   \ssh -i "$keyfile" -X -C -c blowfish-cbc $*
9 else
10   \ssh -X -C -c blowfish-cbc $*
11 fi
12
13 if [ $? -eq 0 ]; then
14   # we don't want to emit anything extra if this is being driven by git.
15   if [ -z "$(echo $* | grep git)" ]; then
16     # re-run the terminal labeller after coming back from ssh.
17     # we check the exit value because we don't want to update this for a failed connection.
18     bash $FEISTY_MEOW_SCRIPTS/tty/label_terminal_with_infos.sh
19   fi
20 fi
21
22