now also unifies plugins in same dir structure

This commit is contained in:
Brian Coca 2016-11-30 22:18:16 -05:00
parent 47a7cb733a
commit eef7b8b5a5

View file

@ -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