diff options
Diffstat (limited to '.ftjerm/1')
-rw-r--r-- | .ftjerm/1/commands/connect | 0 | ||||
-rw-r--r-- | .ftjerm/1/commands/general | 0 | ||||
-rw-r--r-- | .ftjerm/1/commands/get | 0 | ||||
-rw-r--r-- | .ftjerm/1/commands/getp | 0 | ||||
-rw-r--r-- | .ftjerm/1/commands/saguaro | 0 | ||||
-rw-r--r-- | .ftjerm/1/commands/send | 0 | ||||
-rw-r--r-- | .ftjerm/1/commands/sendp | 0 | ||||
-rw-r--r-- | .ftjerm/1/commands/withg | 0 | ||||
-rwxr-xr-x | .ftjerm/1/ssh.sh | 94 |
9 files changed, 94 insertions, 0 deletions
diff --git a/.ftjerm/1/commands/connect b/.ftjerm/1/commands/connect new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/.ftjerm/1/commands/connect diff --git a/.ftjerm/1/commands/general b/.ftjerm/1/commands/general new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/.ftjerm/1/commands/general diff --git a/.ftjerm/1/commands/get b/.ftjerm/1/commands/get new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/.ftjerm/1/commands/get diff --git a/.ftjerm/1/commands/getp b/.ftjerm/1/commands/getp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/.ftjerm/1/commands/getp diff --git a/.ftjerm/1/commands/saguaro b/.ftjerm/1/commands/saguaro new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/.ftjerm/1/commands/saguaro diff --git a/.ftjerm/1/commands/send b/.ftjerm/1/commands/send new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/.ftjerm/1/commands/send diff --git a/.ftjerm/1/commands/sendp b/.ftjerm/1/commands/sendp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/.ftjerm/1/commands/sendp diff --git a/.ftjerm/1/commands/withg b/.ftjerm/1/commands/withg new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/.ftjerm/1/commands/withg diff --git a/.ftjerm/1/ssh.sh b/.ftjerm/1/ssh.sh new file mode 100755 index 0000000..002560c --- /dev/null +++ b/.ftjerm/1/ssh.sh @@ -0,0 +1,94 @@ +#!/bin/bash +input="" +filename="" +temp="" +action="" +destination="" +sleep .125s + +cd /home/shmibs/.ftjerm/1/commands + +while IFS="" read -r -e -d $'\n' -p "ssh: " -a input; do + history -s "$input" + + IFS=" " + input=($input) + + if [ -n "$input" ]; then + + if [ "${input[0]}" == "send" ]; then + destination="" + if [ "${input[1]}" == "general" ]; then + destination="gamarti6@general.asu.edu:/afs/asu.edu/users/g/a/m/gamarti6/" + fi + + if [ "${input[1]}" == "withg" ]; then + destination="shmibs@withg.org:/home/shmibs/" + fi + + if [ "${input[1]}" == "saguaro" ]; then + destination="gamarti6@saguaro.fulton.asu.edu:/home/gamarti6/" + fi + + if [ -n "$destination" ]; then + cd ~ + read -r -e -d $'\n' -p "~/" -a filename + temp=`basename $filename` + scp -r '/home/shmibs/$filename' '$destination$temp' + cd /home/shmibs/.ftjerm/1/commands + + fi + fi + + if [ "$input" == "sendp" ]; then + cd ~ + read -r -e -d $'\n' -p "~/" -a filename + cd /home/shmibs/.ftjerm/1/commands + temp=`basename $filename` + scp -r /home/shmibs/$filename shmibs@withg.org:/home/shmibs/www/$temp + echo "http://withg.org/shmibs/$temp" | xclip -selection clipboard + fi + + if [ "$input" == "get" ]; then + cd ~ + read -r -e -d $'\n' -p "~/" -a filename + cd /home/shmibs/.ftjerm/1/commands + temp=`basename $filename` + scp -r shmibs@withg.org:~/$filename ~/Desktop/$temp + fi + + if [ "$input" == "getp" ]; then + cd ~ + read -r -e -d $'\n' -p "~/www/" -a filename + cd /home/shmibs/.ftjerm/1/commands + temp=`basename $filename` + scp -r shmibs@withg.org:/home/shimbs/www/$filename ~/Desktop/$temp + fi + + if [ "${input[0]}" == "connect" ]; then + if [ "${input[2]}" != "-X" ]; then + unset ${input[2]} + fi + + destination="" + + if [ "${input[1]}" == "general" ]; then + destination=gamarti6@general.asu.edu + fi + + if [ "${input[1]}" == "withg" ]; then + destination=shmibs@withg.org + fi + + if [ "${input[1]}" == "saguaro" ]; then + destination=gamarti6@saguaro.fulton.asu.edu + fi + + if [ "$destination" != "" ]; then + ssh ${input[2]} $destination + fi + fi + + fi + +done |