Created
December 23, 2015 09:31
-
-
Save planetexpress69/bbe6e5f4f675c79aa0f2 to your computer and use it in GitHub Desktop.
FTP on CLI for simple deployment
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="your.host.name" | |
USER="username" | |
PASS="pasword" | |
FTPURL="ftp://$USER:$PASS@$HOST" | |
LCD="/Users/martin/Desktop/emberplayground/oi/dist" | |
RCD="/" | |
#DELETE="--delete" | |
lftp -c "set ftp:list-options -a; | |
open '$FTPURL'; | |
lcd $LCD; | |
cd $RCD; | |
mirror --reverse \ | |
$DELETE \ | |
--verbose \ | |
--exclude-glob a-dir-to-exclude/ \ | |
--exclude-glob a-file-to-exclude \ | |
--exclude-glob a-file-group-to-exclude* \ | |
--exclude-glob other-files-to-exclude" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment