Created
April 5, 2012 00:03
-
-
Save abronte/2306690 to your computer and use it in GitHub Desktop.
LFTP sync
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
HOST="email.com:1234" | |
USER="username" | |
PASS="password" | |
LCD="/path/to/local/dir" | |
RCD="/path/to/remote/dir" | |
if [ ! -e "/tmp/xfer" ] | |
then | |
touch /tmp/xfer | |
lftp -c "set ftp:list-options -a; | |
open ftp://$USER:$PASS@$HOST; | |
lcd $LCD; | |
cd $RCD; | |
mirror --delete \ | |
--only-missing \ | |
--verbose" | |
rm /tmp/xfer | |
else | |
echo "Xfering already going" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment