summaryrefslogtreecommitdiffstats
path: root/scripts/_sftp-ssh._tcp.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/_sftp-ssh._tcp.sh')
-rwxr-xr-xscripts/_sftp-ssh._tcp.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/_sftp-ssh._tcp.sh b/scripts/_sftp-ssh._tcp.sh
new file mode 100755
index 0000000..0b6a62f
--- /dev/null
+++ b/scripts/_sftp-ssh._tcp.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+TYPE=`basename $0`
+NAME=$1
+HOSTNAME=$2
+ADDRESS=$3
+PORT=$4
+TXTS=$5
+
+for TXT in $TXTS
+do
+ eval TXT_$TXT
+done
+
+if [ ! -z "$TXT_u" ]
+then
+ USER_NAME="-l $TXT_u"
+else
+ USER_NAME=`zenity --entry --text "Login :"`
+ if [ ! -z "$USER_NAME" ]
+ then
+ USER_NAME="$USER_NAME@"
+ fi
+fi
+
+if [ ! -z "$TXT_path" ]
+then
+ path=`echo $TXT_path | sed -e 's/^\///g'`
+fi
+
+sftp "$USERNAME$ADDRESS:$PORT/$path"