testing out this push refs problem, which i think i am causing.
[feisty_meow.git] / scripts / tty / ssh.sh
1 #!/bin/bash
2
3 # a wrapper for the secure shell.
4 # we want to fix any terminal titles that the foreign shells give us, and
5 # this script is our chance to do so.
6
7 #hmmm: not the slightest bit general here.
8 #      what about having a main key variable and a sourceforge key variable?
9 #      better yet, an array of site patterns and keys for those sites.
10
11 keyfile="$HOME/.ssh/id_dsa_fred"
12
13 if [ ! -z "$(echo $* | grep -i sourceforge)" ]; then
14   keyfile="$HOME/.ssh/id_dsa_sourceforge"
15 fi
16
17 echo hey we be on wik dese parms $* >~/crap.txt
18
19 \ssh -i "$keyfile" -X $*
20
21 if [ $? -eq 0 ]; then
22   # re-run the terminal labeller after coming back from ssh.
23   # we check the exit value because we don't want to update this for a failed connection.
24   bash $FEISTY_MEOW_SCRIPTS/tty/label_terminal_with_infos.sh
25 fi
26
27