Created
November 30, 2018 00:29
-
-
Save davemac/0ebdcd4de087a9f369b7e1ee2d3e4edb to your computer and use it in GitHub Desktop.
getuploads
This file contains hidden or 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
# rsync wp uploads directory from staging to current site, exclude .pdf files | |
# uses command line argument $1 for prod or staging ssh alias | |
getups() { | |
current=${PWD##*/} | |
cd ~/Sites/$current/wp-content/uploads || return | |
rsync -avzW --progress --exclude '*.pdf' --exclude '*.docx' $current-$1:~/www/wp-content/uploads/* . | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment