From aac9ed023d7ca852f9339e3a143b1b40b3045961 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 1 Jun 2013 17:59:33 -0300 Subject: Changing symlink scheme of the shell wrapper --- assh | 28 +--------------------------- shell | 28 +++++++++++++++++++++++++++- shelll | 2 +- shells | 2 +- 4 files changed, 30 insertions(+), 30 deletions(-) mode change 100755 => 120000 assh mode change 120000 => 100755 shell diff --git a/assh b/assh deleted file mode 100755 index fb4c8b6..0000000 --- a/assh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# -# simple autossh and screen wrapper -# - -BASENAME="`basename $0`" -DEST="$1" -COMMAND="$2" - -if [ -z "$DEST" ]; then - exit 1 -fi - -if [ "$BASENAME" == "asshs" ] || [ "$BASENAME" == "shells" ]; then - # Remote screen shell using autossh - if [ "$COMMAND" == "root" ]; then - autossh $DEST -t -- sudo screen -x - else - autossh $DEST -t -- screen -x $COMMAND - fi -elif [ "$BASENAME" == "shelll" ]; then - # Local screen shell - wscreen $* -else - # Remote shell using autossh - autossh $DEST -t -- $COMMAND -fi diff --git a/assh b/assh new file mode 120000 index 0000000..03e813f --- /dev/null +++ b/assh @@ -0,0 +1 @@ +shell \ No newline at end of file diff --git a/shell b/shell deleted file mode 120000 index daa19ce..0000000 --- a/shell +++ /dev/null @@ -1 +0,0 @@ -assh \ No newline at end of file diff --git a/shell b/shell new file mode 100755 index 0000000..fb4c8b6 --- /dev/null +++ b/shell @@ -0,0 +1,27 @@ +#!/bin/bash +# +# simple autossh and screen wrapper +# + +BASENAME="`basename $0`" +DEST="$1" +COMMAND="$2" + +if [ -z "$DEST" ]; then + exit 1 +fi + +if [ "$BASENAME" == "asshs" ] || [ "$BASENAME" == "shells" ]; then + # Remote screen shell using autossh + if [ "$COMMAND" == "root" ]; then + autossh $DEST -t -- sudo screen -x + else + autossh $DEST -t -- screen -x $COMMAND + fi +elif [ "$BASENAME" == "shelll" ]; then + # Local screen shell + wscreen $* +else + # Remote shell using autossh + autossh $DEST -t -- $COMMAND +fi diff --git a/shelll b/shelll index daa19ce..03e813f 120000 --- a/shelll +++ b/shelll @@ -1 +1 @@ -assh \ No newline at end of file +shell \ No newline at end of file diff --git a/shells b/shells index daa19ce..03e813f 120000 --- a/shells +++ b/shells @@ -1 +1 @@ -assh \ No newline at end of file +shell \ No newline at end of file -- cgit v1.2.3