]> gitweb.fluxo.info Git - scripts.git/commitdiff
Shell wrapper
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 1 Jun 2013 20:57:24 +0000 (17:57 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 1 Jun 2013 20:57:24 +0000 (17:57 -0300)
assh
shell [new symlink]
shelll [new symlink]
shells [new symlink]

diff --git a/assh b/assh
index 07e75f0f665143b3c24435b0f66fa713a4992832..fb4c8b6633b8334975c229272f011a14519ed39c 100755 (executable)
--- a/assh
+++ b/assh
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# simple autossh wrapper
+# simple autossh and screen wrapper
 #
 
 BASENAME="`basename $0`"
@@ -11,12 +11,17 @@ if [ -z "$DEST" ]; then
   exit 1
 fi
 
-if [ "$BASENAME" == "asshs" ]; then
+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/shell b/shell
new file mode 120000 (symlink)
index 0000000..daa19ce
--- /dev/null
+++ b/shell
@@ -0,0 +1 @@
+assh
\ No newline at end of file
diff --git a/shelll b/shelll
new file mode 120000 (symlink)
index 0000000..daa19ce
--- /dev/null
+++ b/shelll
@@ -0,0 +1 @@
+assh
\ No newline at end of file
diff --git a/shells b/shells
new file mode 120000 (symlink)
index 0000000..daa19ce
--- /dev/null
+++ b/shells
@@ -0,0 +1 @@
+assh
\ No newline at end of file