Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- read -p "Are you sure you want to go to production? <y/N> " prompt
- if [[ $prompt =~ [yY](es)* ]]
- then
- echo "---- UPDATE example.net SITE ----"
- HOST="ftp.example.net"
- USER="username"
- PASS="password"
- FTPURL="ftp://$USER:$PASS@$HOST"
- LCD="/Users/username/Sites/project-name"
- RCD="/public_html"
- lftp -c "set ftp:list-options -a; \
- open '$FTPURL'; \
- lcd $LCD; \
- cd $RCD; \
- mirror --reverse --delete --only-newer --use-cache --verbose --allow-chown \
- --allow-suid --no-umask --parallel=2"
- else
- echo "Becarefull, bye !!"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement