diff --git a/bin/kubectl-crossplane-stack-init b/bin/kubectl-crossplane-stack-init index 1317e17..58d09a2 100755 --- a/bin/kubectl-crossplane-stack-init +++ b/bin/kubectl-crossplane-stack-init @@ -64,6 +64,7 @@ function create_manifest { mkdir -p config/stack/manifests touch config/stack/manifests/app.yaml cat > config/stack/manifests/app.yaml < \ - $(STACK_PACKAGE_REGISTRY)/resources/$$( basename $$(echo $$filename | sed s/.yaml$$/.crd.yaml/)) \ + while read filename ; do \ + mkdir -p $(STACK_PACKAGE_REGISTRY)/resources/$$(basename $${filename%_*}); \ + concise=$${filename#*_}; \ + cat $$filename > \ + $(STACK_PACKAGE_REGISTRY)/resources/$$( basename $${filename%_*} )/$$( basename $${concise/.yaml/.crd.yaml} ) \ ; done cp -r $(STACK_PACKAGE_REGISTRY_SOURCE)/* $(STACK_PACKAGE_REGISTRY)