Change FQCN only in files from the right collection
Before we were substituting community.general even in the main README.md. Related: rhbz2112434
This commit is contained in:
parent
8cf9810759
commit
6b756590a3
@ -119,16 +119,21 @@ for dir in %{_builddir}/.external/*/*; do
|
|||||||
name=$(basename "$dir")
|
name=$(basename "$dir")
|
||||||
ns=$(basename $(dirname "$dir"))
|
ns=$(basename $(dirname "$dir"))
|
||||||
for module in "${modules[@]}"; do
|
for module in "${modules[@]}"; do
|
||||||
cp -pL $dir/plugins/modules/$module plugins/modules/
|
dest_module=plugins/modules/$(basename $module)
|
||||||
done
|
cp -pL $dir/plugins/modules/$module $dest_module
|
||||||
for module_util in "${module_utils[@]}"; do
|
|
||||||
cp -pL $dir/plugins/module_utils/$module_util plugins/module_utils/$module_util
|
|
||||||
done
|
|
||||||
# Replacing original collection name by downstream (vendored) name
|
# Replacing original collection name by downstream (vendored) name
|
||||||
if [ "${ns}" != "%{collection_namespace}" ] || [ "${name}" != "%{collection_name}" ] ; then
|
if [ "${ns}" != "%{collection_namespace}" ] || [ "${name}" != "%{collection_name}" ] ; then
|
||||||
find -type f -exec \
|
sed "s/${ns}[.]${name}/%{collection_namespace}.%{collection_name}/g" -i $dest_module
|
||||||
sed "s/${ns}[.]${name}/%{collection_namespace}.%{collection_name}/g" -i {} \;
|
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
for module_util in "${module_utils[@]}"; do
|
||||||
|
dest_module_util=plugins/module_utils/$module_util
|
||||||
|
cp -pL $dir/plugins/module_utils/$module_util $dest_module_util
|
||||||
|
# Replacing original collection name by downstream (vendored) name
|
||||||
|
if [ "${ns}" != "%{collection_namespace}" ] || [ "${name}" != "%{collection_name}" ] ; then
|
||||||
|
sed "s/${ns}[.]${name}/%{collection_namespace}.%{collection_name}/g" -i $dest_module_util
|
||||||
|
fi
|
||||||
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user