From: Chris Koeritz Date: Mon, 26 Jan 2015 04:15:15 +0000 (-0500) Subject: cleaning up some too specialized scripts that fred uses. X-Git-Tag: 2.140.90~716 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=baf34d26f73b32deb1a89feb0fa2d1469e397405;p=feisty_meow.git cleaning up some too specialized scripts that fred uses. --- diff --git a/customizing/fred/scripts/pick_credentials.sh b/customizing/fred/scripts/pick_credentials.sh new file mode 100644 index 00000000..8b4b55e6 --- /dev/null +++ b/customizing/fred/scripts/pick_credentials.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# chooses the right certificate to use for logging in via ssh. + +#hmmm: not the slightest bit general here currently. +# 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 + +if [ ! -f "$keyfile" ]; then + unset keyfile +fi diff --git a/customizing/fred/scripts/sftp.sh b/customizing/fred/scripts/sftp.sh new file mode 100644 index 00000000..2db8612c --- /dev/null +++ b/customizing/fred/scripts/sftp.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +source "$FEISTY_MEOW_GENERATED/custom/scripts/pick_credentials.sh" + +# a wrapper for the file transfers using secure shell. +\sftp -i "$keyfile" $* + diff --git a/customizing/fred/scripts/ssh.sh b/customizing/fred/scripts/ssh.sh index 2e1b3742..9bf10d17 100755 --- a/customizing/fred/scripts/ssh.sh +++ b/customizing/fred/scripts/ssh.sh @@ -2,7 +2,7 @@ # wraps our calling the secure shell and lets us pick our credentials. -source "$FEISTY_MEOW_SCRIPTS/security/pick_credentials.sh" +source "$FEISTY_MEOW_GENERATED/custom/scripts/pick_credentials.sh" if [ ! -z "$keyfile" ]; then \ssh -i "$keyfile" -X -C -c blowfish-cbc $* diff --git a/scripts/security/pick_credentials.sh b/scripts/security/pick_credentials.sh deleted file mode 100644 index 8b4b55e6..00000000 --- a/scripts/security/pick_credentials.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# chooses the right certificate to use for logging in via ssh. - -#hmmm: not the slightest bit general here currently. -# 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 - -if [ ! -f "$keyfile" ]; then - unset keyfile -fi diff --git a/scripts/security/sftp.sh b/scripts/security/sftp.sh deleted file mode 100644 index fd381773..00000000 --- a/scripts/security/sftp.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -source "$FEISTY_MEOW_SCRIPTS/security/pick_credentials.sh" - -# a wrapper for the file transfers using secure shell. -\sftp -i "$keyfile" $* -