Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support running cf-promises on MacOS X using GNU-find (from homebrew) #53

Merged
merged 1 commit into from May 9, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions tree/promises.cf
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,27 @@ bundle common inputs
vars:
# this list contains everything that is in the 10_ncf_internals
"ncf_internals_files" slist => lsdir("${me.framework_path}/10_ncf_internals", ".*\.cf", "true");


"find_command" string => "/usr/bin/find",
policy => "overridable";

darwin::
"find_command" string => "/usr/local/bin/gfind",
comment => "This assumes 'findutils' installed via homebrew to '/usr/local/'";

any::
# Here, we get all the generic files of the framework (basics, methods, it ops knowledge)
# without their full path as it may break the 4K limit
# see https://cfengine.com/dev/issues/2912
"generic_framework" string => execresult("/bin/bash -c \"cd ${me.framework_path} && /usr/bin/find 20_cfe_basics 30_generic_methods 40_it_ops_knowledge -name '*.cf' -printf '%p\n'\"", "noshell");
"generic_framework" string => execresult("/bin/bash -c \"cd ${me.framework_path} && ${find_command} 20_cfe_basics 30_generic_methods 40_it_ops_knowledge -name '*.cf' -printf '%p\n'\"", "noshell");

# The Techniques and Services part are choosen separatly, as we may not want to load
# them all automatically in the future
# This fetches the techniques cf files
"techniques" string => execresult("/bin/bash -c \"cd ${me.framework_path} && /usr/bin/find 50_techniques -name '*.cf' -printf '${me.framework_path}/%p\n'\"", "noshell");
"techniques" string => execresult("/bin/bash -c \"cd ${me.framework_path} && ${find_command} 50_techniques -name '*.cf' -printf '${me.framework_path}/%p\n'\"", "noshell");
# This fetches the services cf files
"services" string => execresult("/bin/bash -c \"cd ${me.framework_path} && /usr/bin/find 60_services -name '*.cf' -printf '${me.framework_path}/%p\n'\"", "noshell");
"services" string => execresult("/bin/bash -c \"cd ${me.framework_path} && ${find_command} 60_services -name '*.cf' -printf '${me.framework_path}/%p\n'\"", "noshell");

# We have to convert the result of the find into lists so that they can be use in the
# inputs list
Expand Down