slitaz-tools view tinyutils/scpbox @ rev 506
Update AUTHORS file
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Fri Oct 22 22:38:41 2010 +0200 (2010-10-22) |
parents | 722e05609654 |
children | 0f5e3af5a51d |
line source
1 #!/bin/sh
2 #
3 # Gtkdialog box interafce for secure file transfer with scp from Dropbear.
4 # - SliTaz GNU/Linux 2008-2010.
5 #
6 VERSION=20100314
8 # Include gettext helper script.
9 . /usr/bin/gettext.sh
11 # Export package name for gettext.
12 TEXTDOMAIN='scpbox'
13 export TEXTDOMAIN
15 # Box
16 export SCP_DIALOG='
17 <window title="Scpbox" icon-name="folder-remote">
18 <vbox>
20 <text use-markup="true">
21 <label>"
22 <b>SliTaz - Scpbox</b>"
23 </label>
24 </text>
25 <text wrap="true" width-chars="52" use-markup="true">
26 <label>"'`gettext "
27 Copy files securely with scp from Dropbear SSH client/server.
28 "`'"</label>
29 </text>
31 <frame '`gettext "Configuration"`'>
32 <hbox>
33 <text use-markup="true">
34 <label>"'`gettext "<b>User :</b>"`'"</label>
35 </text>
36 <entry>
37 <variable>USER</variable>
38 </entry>
39 </hbox>
40 <hbox>
41 <text use-markup="true">
42 <label>"'`gettext "<b>Host :</b>"`'"</label>
43 </text>
44 <entry>
45 <variable>HOST</variable>
46 </entry>
47 </hbox>
48 <hbox>
49 <text use-markup="true">
50 <label>"'`gettext "<b>Options :</b>"`'"</label>
51 </text>
52 <entry>
53 <default>-r -P 22</default>
54 <variable>SCP_OPTS</variable>
55 </entry>
56 </hbox>
57 </frame>
59 <frame '`gettext "Paths"`'>
60 <hbox>
61 <text use-markup="true">
62 <label>"'`gettext "<b>Local :</b>"`'"</label>
63 </text>
64 <entry>
65 <input>echo $HOME</input>
66 <variable>LOCAL_PATH</variable>
67 </entry>
68 <button>
69 <input file icon="gtk-open"></input>
70 <action type="fileselect">LOCAL_PATH</action>
71 </button>
72 </hbox>
73 <hbox>
74 <text use-markup="true">
75 <label>"'`gettext "<b>Remote :</b>"`'"</label>
76 </text>
77 <entry>
78 <variable>REMOTE_PATH</variable>
79 </entry>
80 </hbox>
81 </frame>
83 <hbox>
84 <button>
85 <label>'`gettext "Download"`'</label>
86 <input file icon="down"></input>
87 <action>xterm -geometry 80x16 -e scp $SCP_OPTS $USER@$HOST:$REMOTE_PATH $LOCAL_PATH</action>
88 </button>
89 <button>
90 <label>'`gettext "Upload"`'</label>
91 <input file icon="up"></input>
92 <action>xterm -geometry 80x16 -e scp $SCP_OPTS $LOCAL_PATH $USER@$HOST:$REMOTE_PATH</action>
93 </button>
94 <button>
95 <label>'`gettext "Exit"`'</label>
96 <input file icon="exit"></input>
97 <action type="exit">Exit</action>
98 </button>
99 </hbox>
101 </vbox>
102 </window>'
104 gtkdialog --program=SCP_DIALOG >/dev/null
106 exit 0