Skip to content

Instantly share code, notes, and snippets.

@tgrecojs
Created December 13, 2020 05:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tgrecojs/c14029fe5472808afaa9ab4bab49a5c3 to your computer and use it in GitHub Desktop.
Save tgrecojs/c14029fe5472808afaa9ab4bab49a5c3 to your computer and use it in GitHub Desktop.
bash script for excluding
#!/usr/bin/env bash
set -e # always immediately exit upon error
# directory config. ending slashes are important!
# src_dir="$HOME/Projects/"
gdrive_projects-dir="$HOME/Google\ Drive/cloud-based-demo-applications"
# run the sync
rsync -ar --delete \
--filter=':- .gitignore' \
--exclude='node_modules' \
--exclude='.git' \
--exclude='.DS_Store' \
--chmod='F-w' \
"$gdrive_projects" # "$dest_dir"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment