Created
February 22, 2022 01:37
-
-
Save Leftium/290422ceff5c4af165198a2005ee33df to your computer and use it in GitHub Desktop.
Recursively ignore node_modules in Dropbox. Git for Windows edition.
This file contains 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
#!/bin/sh | |
# vim: wrap! | |
# Recursively ignore node_modules in Dropbox. Git for Windows edition. | |
# Based on: https://stackoverflow.com/a/69655523/117030 | |
find "$1" -type d | grep 'node_modules$' | grep -v '/node_modules/' | xargs -I {} -t powershell -command "Set-Content -Path '{}' -Stream com.dropbox.ignored -Value 1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment