1#!/bin/sh 2# -*- tcl -*- \ 3exec tclsh "$0" ${1+"$@"} 4 5# syntax: receive FILE 6# Run this before transmit, will wait for connection. 7 8package require transfer::receiver 9 10set file [lindex $argv 0] 11 12proc OK {f args} { 13 puts "\nDone ($args) $f" 14 exit 15} 16 17proc PR {f args} { 18 puts "Progress ($args) $f" 19 return 20} 21 22transfer::receiver stream file $file {} 6789 \ 23 -command [list OK $file] \ 24 -progress [list PR $file] 25 26vwait forever 27exit 28