Created
May 24, 2013 18:39
-
-
Save lincank/5645623 to your computer and use it in GitHub Desktop.
FTP sync with lftp
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='web_host' | |
USER='foo' | |
PASS='pwd' | |
TARGETFOLDER='www' | |
SOURCEFOLDER='/path/to/something' | |
lftp -f " | |
open $HOST | |
user $USER $PASS | |
lcd $SOURCEFOLDER | |
mirror --reverse --delete --use-cache --verbose --only-newer $SOURCEFOLDER $TARGETFOLDER \ | |
--exclude uploadfile --exclude .git | |
bye | |
" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment