Skip to content

Instantly share code, notes, and snippets.

@mikybars
Last active October 8, 2019 10:29
Show Gist options
  • Select an option

  • Save mikybars/c4bb19e9455da36eefcfbdb50c97157c to your computer and use it in GitHub Desktop.

Select an option

Save mikybars/c4bb19e9455da36eefcfbdb50c97157c to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
USER=XXX
HOST=XXX
LOCAL_PATH=$(pwd)
REMOTE_PATH=docker/apache2/html
cat > /tmp/rsync-include.txt <<EOF
*/
*.html
*.css
*.png
*.jpg
*.js
EOF
rsync -avz \
--include-from=/tmp/rsync-include.txt \
--exclude="*" \
--prune-empty-dirs \
$LOCAL_PATH $USER@$HOST:$REMOTE_PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment