mirror of https://github.com/k3s-io/k3s
Simplify find in cache_go_dirs.sh
parent
46aecdaa0a
commit
4bb2118fb8
|
@ -36,22 +36,23 @@ trap "rm -f '${CACHE}'" HUP INT TERM ERR
|
||||||
# Example:
|
# Example:
|
||||||
# kfind -type f -name foobar.go
|
# kfind -type f -name foobar.go
|
||||||
function kfind() {
|
function kfind() {
|
||||||
# include the "special" vendor directories which are actually part
|
# We want to include the "special" vendor directories which are actually
|
||||||
# of the Kubernetes source tree - generators will use these for
|
# part of the Kubernetes source tree (./staging/*) but we need them to be
|
||||||
# including certain core API concepts.
|
# named as their ./vendor/* equivalents. Also, we do not want all of
|
||||||
find -H . ./vendor/k8s.io/apimachinery ./vendor/k8s.io/apiserver ./vendor/k8s.io/kube-aggregator ./vendor/k8s.io/apiextensions-apiserver ./vendor/k8s.io/metrics ./vendor/k8s.io/sample-apiserver ./vendor/k8s.io/api ./vendor/k8s.io/client-go ./vendor/k8s.io/code-generator ./vendor/k8s.io/sample-controller \
|
# ./vendor or even all of ./vendor/k8s.io.
|
||||||
|
find -H . \
|
||||||
\( \
|
\( \
|
||||||
-not \( \
|
-not \( \
|
||||||
\( \
|
\( \
|
||||||
-path ./vendor -o \
|
-path ./vendor -o \
|
||||||
-path ./staging -o \
|
|
||||||
-path ./_\* -o \
|
-path ./_\* -o \
|
||||||
-path ./.\* -o \
|
-path ./.\* -o \
|
||||||
-path ./docs \
|
-path ./docs \
|
||||||
\) -prune \
|
\) -prune \
|
||||||
\) \
|
\) \
|
||||||
\) \
|
\) \
|
||||||
"$@"
|
"$@" \
|
||||||
|
| sed 's|^./staging/src|vendor|'
|
||||||
}
|
}
|
||||||
|
|
||||||
NEED_FIND=true
|
NEED_FIND=true
|
||||||
|
|
Loading…
Reference in New Issue