2018-01-11 16:46:04 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -o errexit
|
|
|
|
set -o pipefail
|
|
|
|
set -o nounset
|
|
|
|
|
|
|
|
echo "Prune dependencies"
|
|
|
|
|
|
|
|
find vendor -name '*_test.go' -exec rm {} \;
|
|
|
|
|
|
|
|
find vendor -type f \( ! -iname 'licen[cs]e*' \
|
|
|
|
-a ! -iname '*notice*' \
|
|
|
|
-a ! -iname '*patent*' \
|
|
|
|
-a ! -iname '*copying*' \
|
|
|
|
-a ! -iname '*unlicense*' \
|
|
|
|
-a ! -iname '*copyright*' \
|
|
|
|
-a ! -iname '*copyleft*' \
|
|
|
|
-a ! -iname '*legal*' \
|
|
|
|
-a ! -iname 'disclaimer*' \
|
|
|
|
-a ! -iname 'third-party*' \
|
|
|
|
-a ! -iname 'thirdparty*' \
|
|
|
|
-a ! -iname '*.go' \
|
|
|
|
-a ! -iname '*.c' \
|
2018-01-22 11:16:03 +00:00
|
|
|
-a ! -iname '*.s' \
|
|
|
|
-a ! -iname '*.pl' \
|
2018-01-11 16:46:04 +00:00
|
|
|
-a ! -iname '*.cc' \
|
|
|
|
-a ! -iname '*.cpp' \
|
|
|
|
-a ! -iname '*.cxx' \
|
|
|
|
-a ! -iname '*.h' \
|
|
|
|
-a ! -iname '*.hh' \
|
|
|
|
-a ! -iname '*.hpp' \
|
|
|
|
-a ! -iname '*.hxx' \
|
2019-03-14 14:56:06 +00:00
|
|
|
-a ! -wholename 'vendor/k8s.io/code-generator/*' \
|
2018-01-11 16:46:04 +00:00
|
|
|
-a ! -iname '*.s' \) -exec rm -f {} +
|
2018-02-07 22:30:05 +00:00
|
|
|
|
2018-10-10 17:10:04 +00:00
|
|
|
find . -type d \( -iname '*Godeps*' \) -exec rm -rf {} +
|
2018-02-07 22:30:05 +00:00
|
|
|
|
|
|
|
find vendor -type l \( ! -iname 'licen[cs]e*' \
|
|
|
|
-a ! -iname '*notice*' \
|
|
|
|
-a ! -iname '*patent*' \
|
|
|
|
-a ! -iname '*copying*' \
|
|
|
|
-a ! -iname '*unlicense*' \
|
|
|
|
-a ! -iname '*copyright*' \
|
|
|
|
-a ! -iname '*copyleft*' \
|
|
|
|
-a ! -iname '*legal*' \
|
|
|
|
-a ! -iname 'disclaimer*' \
|
|
|
|
-a ! -iname 'third-party*' \
|
|
|
|
-a ! -iname 'thirdparty*' \
|
|
|
|
-a ! -iname '*.go' \
|
|
|
|
-a ! -iname '*.c' \
|
|
|
|
-a ! -iname '*.S' \
|
|
|
|
-a ! -iname '*.cc' \
|
|
|
|
-a ! -iname '*.cpp' \
|
|
|
|
-a ! -iname '*.cxx' \
|
|
|
|
-a ! -iname '*.h' \
|
|
|
|
-a ! -iname '*.hh' \
|
|
|
|
-a ! -iname '*.hpp' \
|
|
|
|
-a ! -iname '*.hxx' \
|
2018-10-10 17:10:04 +00:00
|
|
|
-a ! -iname '*.s' \) -exec rm -f {} +
|