File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -65,12 +65,6 @@ case "$(uname -m)" in
65
65
;;
66
66
esac
67
67
68
- # Get the absolute path of the directory component of a file, i.e. the
69
- # absolute path of the dirname of $1.
70
- get_absolute_dirname () {
71
- echo " $( cd " $( dirname " $1 " ) " && pwd) "
72
- }
73
-
74
68
function get_bin() {
75
69
bin=" ${1:- } "
76
70
srcdir=" ${2:- } "
@@ -93,9 +87,12 @@ function get_bin() {
93
87
# The bazel go rules place binaries in subtrees like
94
88
# "bazel-bin/source/path/linux_amd64_pure_stripped/binaryname", so make sure
95
89
# the platform name is matched in the path.
96
- locations+=($( find " ${KUBE_ROOT} /bazel-bin/${srcdir} " -type f -executable \
97
- -path " */${host_os} _${host_arch} */${bin} " 2> /dev/null || true) )
98
- echo $( (ls -t " ${locations[@]} " 2> /dev/null || true) | head -1 )
90
+ while IFS=$' \n ' read -r line; do
91
+ locations+=( " ${line} " )
92
+ done < <( find " ${KUBE_ROOT} /bazel-bin/${srcdir} " -type f -executable \
93
+ -path " */${host_os} _${host_arch} */${bin} " 2> /dev/null || true)
94
+
95
+ (ls -t " ${locations[@]} " 2> /dev/null || true) | head -1
99
96
}
100
97
101
98
function print_error() {
Original file line number Diff line number Diff line change 1
1
./build/lib/release.sh
2
2
./cluster/addons/addon-manager/kube-addons.sh
3
3
./cluster/addons/fluentd-elasticsearch/es-image/run.sh
4
- ./cluster/clientbin.sh
5
4
./cluster/common.sh
6
5
./cluster/gce/config-common.sh
7
6
./cluster/gce/config-default.sh
You can’t perform that action at this time.
0 commit comments