Newer
Older
cortex-hub / scripts / remote_sync.exp
#!/usr/bin/expect -f
set timeout 300
set password "a6163484a"
set user "axieyangb"
set host "192.168.68.113"
set local_dir [lindex $argv 0]
set remote_path [lindex $argv 1]

spawn rsync -avz --delete --exclude ".git" --exclude "node_modules" --exclude "__pycache__" -e "ssh -o StrictHostKeyChecking=no" $local_dir $user@$host:$remote_path
expect {
    "password:" {
        send "$password\r"
        exp_continue
    }
    eof
}