Advertisement
Guest User

Untitled

a guest
Jul 26th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #!/bin/bash
  2. read -p "Are you sure you want to go to production? <y/N> " prompt
  3. if [[ $prompt =~ [yY](es)* ]]
  4. then
  5. echo "---- UPDATE example.net SITE ----"
  6. HOST="ftp.example.net"
  7. USER="username"
  8. PASS="password"
  9. FTPURL="ftp://$USER:$PASS@$HOST"
  10. LCD="/Users/username/Sites/project-name"
  11. RCD="/public_html"
  12. lftp -c "set ftp:list-options -a; \
  13. open '$FTPURL'; \
  14. lcd $LCD; \
  15. cd $RCD; \
  16. mirror --reverse --delete --only-newer --use-cache --verbose --allow-chown \
  17. --allow-suid --no-umask --parallel=2"
  18. else
  19. echo "Becarefull, bye !!"
  20. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement