Closed citosid closed 9 years ago
The documentation fix would be: change
expect -c <<'END_EXPECT'
to
expect <<END_EXPECT
in both places. If passphrase-less ssh keys are set up, expect is not required, as there's no password to enter.
For me it works like this
#!/bin/sh
case "$1" in
upload)
cmd="put $3 public_html/$2/"
;;
download)
cmd="get public_html/$2/$3"
;;
esac
echo "$cmd" | sftp -i /Users/myuser/.ssh/private.key root@dev.site.org
aha, the documentation just an example of how to write .sync file, thanks for your worthwhile suggestion and just do it as you like.
I have a MacBook Pro with OSX 10.9, and I came to notice your documentation is wrong.
Instead of having the configuration script for sftp
Actually, there is no needed expect at all...
With this command it will work the same:
You can refer to: http://bit.ly/YdIzyH