diff options
author | Brian Coca <brian.coca+git@gmail.com> | 2016-11-30 22:18:16 -0500 |
---|---|---|
committer | Brian Coca <brian.coca+git@gmail.com> | 2016-11-30 22:18:35 -0500 |
commit | eef7b8b5a57199d5c2c5a4c905f148a53d5a8577 (patch) | |
tree | 2b9f506c78d0989d6dae69a8e8b8ad8817cd2e7a /hacking | |
parent | 47a7cb733a2fbe17cdcd0a2220bd83e5520528a1 (diff) | |
download | ansible-eef7b8b5a57199d5c2c5a4c905f148a53d5a8577.tar.gz |
now also unifies plugins in same dir structure
Diffstat (limited to 'hacking')
-rwxr-xr-x | hacking/unify_repos.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/hacking/unify_repos.sh b/hacking/unify_repos.sh index fde2953862..57f7e01914 100755 --- a/hacking/unify_repos.sh +++ b/hacking/unify_repos.sh @@ -33,3 +33,24 @@ git commit -am 'core modules back to main repo' git merge -s ours --allow-unrelated-histories --no-commit extras_modules/devel git read-tree --prefix=lib/ansible/modules/extras -u extras_modules/devel git commit -am 'extras modules back to main repo' + +for subdir in core extras +do + # unify directories + for mydir in $(find lib/ansible/modules/${subdir} -type d) + do + mkdir -p ${mydir/$subdir\//} + done + + # move plugins + for myfile in $(find lib/ansible/modules/${subdir} -type f|grep -v '.github') + do + if [ -e ${myfile/$subdir\///} ]; then #mostly to avoid __init__.py clobering + echo "skipping ${myfile} as it already exists in destination" + else + git mv ${myfile} ${myfile/$subdir\//} + fi + done + + git rm -rf lib/ansible/modules/${subdir} +done |