Find all folders named ./components/[folder]/docs and copy contents to ./docs/components/[folder]
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/bash | |
find . | grep -E "^\./components/(.*)/docs$" | while read -r path; do | |
folder=$(echo "$path" | sed 's/^.\/components\(.*\)\/docs$/\1/') | |
mkdir -p ./docs/components/$folder | |
cp -r $path/* ./docs/components/$folder | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment