summaryrefslogtreecommitdiffstats
path: root/scpcall.exp
diff options
context:
space:
mode:
Diffstat (limited to 'scpcall.exp')
-rwxr-xr-xscpcall.exp13
1 files changed, 7 insertions, 6 deletions
diff --git a/scpcall.exp b/scpcall.exp
index ca76a6cf..0add445c 100755
--- a/scpcall.exp
+++ b/scpcall.exp
@@ -18,20 +18,21 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
####################################################################################
-if "$argc == 3" {
+if "$argc == 4" {
# Get username, host and password from commandline if present.
- set username [lindex $argv 0]
- set host [lindex $argv 1]
- set password [lindex $argv 2]
+ set file [lindex $argv 0]
+ set username [lindex $argv 1]
+ set host [lindex $argv 2]
+ set password [lindex $argv 3]
} else {
- exit 0;
+ exit 2;
}
-spawn /usr/bin/scp $username@$host:~/test .
+spawn /usr/bin/scp $file $username@$host:~/
# The sleep is needed to give passwd time to get ready.
expect {