Last active
December 10, 2015 23:18
-
-
Save ejhayes/4507956 to your computer and use it in GitHub Desktop.
This is a pretty nasty way of finding schema.yaml files, renaming them based on directory structure, and moving them to a centralized schemas directory. The goal is to use this for future schema validation.
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
find beta -type f -name \*.yaml | xargs -I file echo file | sed "s/\(\([a-zA-Z\_]\+\)\/\([a-zA-Z\_]\+\).*\)/kwalify -lf \1 \3\/\2.yaml/" | sh && e=$(find beta -type f -name \*.yaml | xargs -I file echo file | sed "s/\(\([a-zA-Z\_]\+\)\/\([a-zA-Z\_]\+\).*\)/kwalify -lf \1 \3\/\2.yaml/" | sh ) && echo $e | grep -v INVALID |
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
find modules -type f -name schema.yaml | xargs -I file echo file | sed "s/\(modules\/\([a-zA-Z\_]\+\)\/.*\)/\Lcp \1 schemas\/\2.yaml/" | sh |
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
find beta -type f -name \*.yaml | xargs -I file echo file | sed "s/\(\([a-zA-Z\_]\+\)\/\([a-zA-Z\_]\+\).*\)/kwalify -lf \1 \3\/\2.yaml/" | sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment