summaryrefslogtreecommitdiff
path: root/hack
diff options
context:
space:
mode:
authorShelley-BaoYue <baoyue2@huawei.com>2024-02-04 16:54:55 +0800
committerShelley-BaoYue <baoyue2@huawei.com>2024-07-02 19:44:52 +0800
commit58e8d9d8f29fc46a5905a2c60d1f981dcf9e11f0 (patch)
tree50bd9d9f782f528d416145e3dc232323d84499f1 /hack
parentupdate go.mod for k8s v1.27.15 (diff)
downloadkubeedge-58e8d9d8f29fc46a5905a2c60d1f981dcf9e11f0.tar.gz
Licensing: skip modules with fewer subdirs than mods
Signed-off-by: Shelley-BaoYue <baoyue2@huawei.com>
Diffstat (limited to 'hack')
-rwxr-xr-xhack/update-vendor-licenses.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/hack/update-vendor-licenses.sh b/hack/update-vendor-licenses.sh
index debc396c1..42d16fcae 100755
--- a/hack/update-vendor-licenses.sh
+++ b/hack/update-vendor-licenses.sh
@@ -206,8 +206,8 @@ for PACKAGE in ${modules}; do
fi
# if there are no files vendored under this package...
if [[ -z "$(find "${DEPS_DIR}/${PACKAGE}" -mindepth 1 -maxdepth 1 -type f)" ]]; then
- # and we have the same number of submodules as subdirectories...
- if [[ "$(find "${DEPS_DIR}/${PACKAGE}/" -mindepth 1 -maxdepth 1 -type d | wc -l)" -eq "$(echo "${modules}" | grep -cE "^${PACKAGE}/")" ]]; then
+ # and we have at least the same number of submodules as subdirectories...
+ if [[ "$(find "${DEPS_DIR}/${PACKAGE}/" -mindepth 1 -maxdepth 1 -type d | wc -l)" -le "$(echo "${modules}" | grep -cE "^${PACKAGE}/")" ]]; then
echo "Only submodules of ${PACKAGE} are vendored, skipping" >&2
continue
fi