better location for ssh and sftp scripts, plus made a lot nicer by having them each use
authorChris Koeritz <fred@gruntose.com>
Sun, 4 Mar 2012 04:30:04 +0000 (23:30 -0500)
committerChris Koeritz <fred@gruntose.com>
Sun, 4 Mar 2012 04:30:04 +0000 (23:30 -0500)
the pick credentials stuff.

scripts/core/variables.sh
scripts/security/sftp.sh [new file with mode: 0644]
scripts/security/ssh.sh [new file with mode: 0755]
scripts/tty/sftp.sh [deleted file]
scripts/tty/ssh.sh [deleted file]

index 48892624f49bf6182a12733126606c1e603cef7a..956198d87f5f31304b4af42df760a63dd7d87841 100644 (file)
@@ -112,8 +112,8 @@ if [ -z "$NECHUNG" ]; then
   export NECHUNG=$FEISTY_MEOW_DIR/database/fortunes.dat
   
   # ensure we use the right kind of secure shell.
-  export CVS_RSH=$FEISTY_MEOW_SCRIPTS/tty/ssh.sh
-  export GIT_SSH=$FEISTY_MEOW_SCRIPTS/tty/ssh.sh
+  export CVS_RSH=$FEISTY_MEOW_SCRIPTS/secure/ssh.sh
+  export GIT_SSH=$FEISTY_MEOW_SCRIPTS/secure/ssh.sh
   
   # the base checkout list is just to update feisty_meow.  additional folder
   # names can be added in your customized scripts.
diff --git a/scripts/security/sftp.sh b/scripts/security/sftp.sh
new file mode 100644 (file)
index 0000000..59cfe4c
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+source "$FEISTY_MEOW_SCRIPTS/pick_credentials.sh"
+
+# a wrapper for the file transfers using secure shell.
+\sftp -i "$keyfile" $*
+
diff --git a/scripts/security/ssh.sh b/scripts/security/ssh.sh
new file mode 100755 (executable)
index 0000000..ca226c3
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# wraps our calling the secure shell and lets us pick our credentials.
+
+source "$FEISTY_MEOW_SCRIPTS/pick_credentials.sh"
+
+\ssh -i "$keyfile" -X $*
+
+if [ $? -eq 0 ]; then
+  # we don't want to emit anything extra if this is being driven by git.
+  if [ -z "$(echo $* | grep git)" ]; then
+    # re-run the terminal labeller after coming back from ssh.
+    # we check the exit value because we don't want to update this for a failed connection.
+    bash $FEISTY_MEOW_SCRIPTS/tty/label_terminal_with_infos.sh
+  fi
+fi
+
+
diff --git a/scripts/tty/sftp.sh b/scripts/tty/sftp.sh
deleted file mode 100644 (file)
index c2e7345..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-
-# a wrapper for the file transfers using secure shell.
-\sftp -i $HOME/.ssh/id_dsa_fred $*
-
diff --git a/scripts/tty/ssh.sh b/scripts/tty/ssh.sh
deleted file mode 100755 (executable)
index 38b7ab1..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/bash
-
-# a wrapper for the secure shell.
-# we want to fix any terminal titles that the foreign shells give us, and
-# this script is our chance to do so.
-
-#hmmm: not the slightest bit general here.
-#      what about having a main key variable and a sourceforge key variable?
-#      better yet, an array of site patterns and keys for those sites.
-
-keyfile="$HOME/.ssh/id_dsa_fred"
-
-if [ ! -z "$(echo $* | grep -i sourceforge)" ]; then
-  keyfile="$HOME/.ssh/id_dsa_sourceforge"
-fi
-
-echo hey we be on wik dese parms $* >~/crap.txt
-
-\ssh -i "$keyfile" -X $*
-
-if [ $? -eq 0 ]; then
-  # we don't want to emit anything extra if this is being driven by git.
-  if [ -z "$(echo $* | grep git)" ]; then
-    # re-run the terminal labeller after coming back from ssh.
-    # we check the exit value because we don't want to update this for a failed connection.
-    bash $FEISTY_MEOW_SCRIPTS/tty/label_terminal_with_infos.sh
-  fi
-fi
-
-