Skip to content

Commit 92cd2a2

Browse files
committed
Exclude the docs directory from pkg search
1 parent 3c2e844 commit 92cd2a2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tools/scripts/find_packages

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ dist_dir="${root_dir}/dist"
2323
# Define the directory path for external library dependencies:
2424
deps_dir="${root_dir}/deps"
2525

26+
# Define the directory path for documentation:
27+
docs_dir="${root_dir}/docs"
28+
2629
# Define the path to the reports directory:
2730
reports_dir="${root_dir}/reports"
2831

@@ -53,9 +56,9 @@ main() {
5356

5457
# On Mac OSX, in order to use `|` and other regular expression operators, we need to use enhanced regular expression syntax (-E); see https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man7/re_format.7.html#//apple_ref/doc/man/7/re_format.
5558
if [[ "${kernel}" == "Darwin" ]]; then
56-
pkgs=$(find -E "${root_dir}" -not -path "${root_dir}/.*" -not -path "${node_modules}/*" -not -path "${tools_dir}/*" -not -path "${tools_pkgs_dir}/*" -not -path "${deps_dir}/*" -not -path "${build_dir}/*" -not -path "${dist_dir}/*" -not -path "${reports_dir}/*" -regex "${packages_filter}" -name "${packages_file}" -exec dirname {} \;)
59+
pkgs=$(find -E "${root_dir}" -not -path "${root_dir}/.*" -not -path "${node_modules}/*" -not -path "${tools_dir}/*" -not -path "${tools_pkgs_dir}/*" -not -path "${deps_dir}/*" -not -path "${docs_dir}/*" -not -path "${build_dir}/*" -not -path "${dist_dir}/*" -not -path "${reports_dir}/*" -regex "${packages_filter}" -name "${packages_file}" -exec dirname {} \;)
5760
else
58-
pkgs=$(find "${root_dir}" -regextype posix-extended -not -path "${root_dir}/.*" -not -path "${node_modules}/*" -not -path "${tools_dir}/*" -not -path "${tools_pkgs_dir}/*" -not -path "${deps_dir}/*" -not -path "${build_dir}/*" -not -path "${dist_dir}/*" -not -path "${reports_dir}/*" -regex "${packages_filter}" -name "${packages_file}" -exec dirname {} \;)
61+
pkgs=$(find "${root_dir}" -regextype posix-extended -not -path "${root_dir}/.*" -not -path "${node_modules}/*" -not -path "${tools_dir}/*" -not -path "${tools_pkgs_dir}/*" -not -path "${deps_dir}/*" -not -path "${docs_dir}/*" -not -path "${build_dir}/*" -not -path "${dist_dir}/*" -not -path "${reports_dir}/*" -regex "${packages_filter}" -name "${packages_file}" -exec dirname {} \;)
5962
fi
6063
echo "${pkgs}"
6164
}

0 commit comments

Comments
 (0)