Newer
Older
#!/bin/bash
HOST=may1716.sd.ece.iastate.edu
USERNAME=may1716
[ -e PASSWORD ] || echo "ERROR: File PASSWORD is missing.
Create a file called PASSWORD, and put the sftp password in that file.
No spaces. No newlines."
[ -e PASSWORD ] || exit 1
PASSWORD=$(cat PASSWORD)
cd _site || exit 1
lftp<<END_SCRIPT
open sftp://$HOST
user $USERNAME $PASSWORD
cd www
mirror -R
exit
END_SCRIPT