#!/usr/bin/expect

set psw [lindex $argv 0]
set path [lindex $argv 1]
set desPath [lindex $argv 2]
#spawn sudo -k
spawn sudo cp -rf $path $desPath
#spawn sudo cp -rf $path /Applications/
#spawn sudo cp -rf ESufingCilentInstall.app/Contents/Resources/ESurfingClient.app /Applications/
#spawn sudo cp -rf /Users/linjl/Desktop/ESurfingClient.app /Applications/
expect ":"
send "$psw\r"
expect ":"
send "$psw\r"
expect ":"
send "$psw\r"
spawn echo cndata
interact
