Created
February 28, 2020 04:00
-
-
Save babarot/e6190627a17d81ccd697a8de9c7a8db6 to your computer and use it in GitHub Desktop.
migrate rego file
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
for policy in $@ | |
do | |
if [[ $policy == *_test.rego ]]; then | |
continue | |
fi | |
if [[ $policy == *.rego ]]; then | |
file=${policy##*/} | |
mkdir -p .policy/rego/prc/"${file%*.rego}" | |
git mv $policy .policy/rego/prc/"${file%*.rego}"/src.rego | |
git mv ${policy%*.rego}_test.rego .policy/rego/prc/"${file%*.rego}"/src_test.rego | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment