k3s/hack
Kubernetes Submit Queue a9ef75b98f
Merge pull request #60308 from ipuustin/shell-bugfix4
Automatic merge from submit-queue (batch tested with PRs 59310, 60424, 60308, 60436, 60020). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix potential issues and bugs in hack/lib/*.sh scripts using shellcheck

**What this PR does / why we need it**:

This PR is continuing the work for cleaning up the shell scripts using shellcheck and manual inspection. The plan is to make the scripts more robust in case for unexpected input and also to fix potential bugs.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

The changes are for scripts in `hack/lib/` directory, and as library scripts are used from multiple places. It is not trivial to see all possible places from where the scripts are accessed, so careful review is needed. I tried to make sure that the changes would be compatible for older bash versions too.

**Release note**:

```release-note
NONE
```
2018-02-27 07:11:47 -08:00
..
boilerplate Require boilerplate on Bazel Skylark source files 2018-02-16 13:44:04 -08:00
cmd/teststale Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
e2e-internal Remove all traces of federation 2017-10-26 13:37:37 -07:00
gen-swagger-doc Switch to k8s.gcr.io vanity domain 2018-02-07 21:14:19 -08:00
jenkins Increase timeout of integration tests 2018-02-26 14:29:42 -08:00
lib hack/lib/protoc.sh: don't split find-binary output. 2018-02-26 16:46:19 +02:00
make-rules Remove cassandra example 2018-02-26 20:39:07 -03:00
testdata update -o name format to kind.group/name 2018-02-15 10:33:06 -05:00
verify-flags Add multi-vc configuration for e2e tests 2018-01-18 15:29:27 -08:00
.golint_failures update golint_failures 2018-02-27 19:58:41 +08:00
.spelling_failures add spelling checking script 2018-02-23 09:33:14 +08:00
BUILD Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
OWNERS Add liggitt to hack approvers 2018-01-18 20:50:18 -05:00
autogenerated_placeholder.txt
benchmark-go.sh
build-cross.sh
build-go.sh
build-ui.sh
cherry_pick_pull.sh Add parent PR title to cherry-picked PR title 2017-11-25 13:36:13 +08:00
dev-build-and-push.sh
dev-build-and-up.sh
dev-push-hyperkube.sh
e2e-node-test.sh
e2e.go
e2e_test.go
generate-bindata.sh cluster: move logging library to hack/ 2018-01-13 16:37:50 -08:00
generate-docs.sh Remove all traces of federation 2017-10-26 13:37:37 -07:00
get-build.sh
ginkgo-e2e.sh cluster: remove unused functions 2018-02-01 07:23:50 -08:00
godep-restore.sh Remove unneeded code 2018-01-30 09:29:51 -08:00
godep-save.sh vendor misspell 2018-02-23 09:33:14 +08:00
grab-profiles.sh remove deprecated /proxy paths 2018-02-20 14:42:19 -08:00
import-restrictions.yaml Expose single annotation/label via downward API 2017-11-21 19:21:10 -08:00
install-etcd.sh
list-feature-tests.sh
local-up-cluster.sh Support Running local-up-cluster in CI 2018-02-24 21:53:51 -05:00
lookup_pull.py
print-workspace-status.sh bazel: support using SOURCE_DATE_EPOCH to override date 2018-02-08 21:12:03 -08:00
run-in-gopath.sh
test-cmd.sh
test-go.sh
test-integration.sh
test-update-storage-objects.sh set default enabled admission plugins by official document 2018-02-22 11:02:02 +08:00
update-all.sh Force use of Makefile for update 2018-01-22 15:11:16 -08:00
update-api-reference-docs.sh
update-bazel.sh bzl: fix update-bazel.sh 2018-02-26 11:01:30 -08:00
update-cloudprovider-gce.sh Fix lint and bazel 2018-01-09 23:09:08 -08:00
update-codegen.sh Partial revert of fb5caac2da 2018-02-14 11:31:51 -08:00
update-generated-device-plugin-dockerized.sh Create pkg/kubelet/apis/deviceplugin/v1beta1 directory. 2018-02-08 17:04:43 -08:00
update-generated-device-plugin.sh
update-generated-docs.sh Remove all traces of federation 2017-10-26 13:37:37 -07:00
update-generated-kms-dockerized.sh Add verify script for kms generated file 2018-02-08 01:29:56 +00:00
update-generated-kms.sh Add generated script for kms api pb file 2018-02-08 01:00:38 +00:00
update-generated-protobuf-dockerized.sh Include generated files 2018-02-23 18:09:06 +01:00
update-generated-protobuf.sh
update-generated-runtime-dockerized.sh Increment CRI version from v1alpha1 to v1alpha2 2018-02-07 09:06:26 +01:00
update-generated-runtime.sh
update-generated-swagger-docs.sh Promote v1alpha1 meta to v1beta1 2018-02-02 14:00:45 -05:00
update-godep-licenses.sh hack: fix godep license parsing for gopkg.in packages 2017-11-22 09:38:17 -08:00
update-gofmt.sh
update-openapi-spec.sh
update-staging-godeps-dockerized.sh Clean up godep scripts to be self-contained 2017-09-29 15:16:03 -07:00
update-staging-godeps.sh
update-swagger-spec.sh Merge pull request #58303 from php-coder/fix_verify-swagger-spec_sript 2018-01-17 02:43:58 -08:00
update-translations.sh
update_owners.py
verify-all.sh
verify-api-groups.sh
verify-api-reference-docs.sh Ignore OWNERS files in hack/verify-api-reference-docs.sh 2017-10-18 11:15:08 -07:00
verify-bazel.sh Route verify-bazel output to stderr 2018-02-07 21:39:38 -08:00
verify-boilerplate.sh Route verify-boilerplate output to stderr 2018-02-07 21:41:31 -08:00
verify-cli-conventions.sh
verify-cloudprovider-gce.sh Fix lint and bazel 2018-01-09 23:09:08 -08:00
verify-codegen.sh Add sample CustomResourceDefinition controller 2017-10-19 00:21:57 +01:00
verify-description.sh pkg/apis/core: fixup package names 2017-11-09 12:14:07 +01:00
verify-flags-underscore.py
verify-generated-device-plugin.sh Create pkg/kubelet/apis/deviceplugin/v1beta1 directory. 2018-02-08 17:04:43 -08:00
verify-generated-docs.sh Remove all traces of federation 2017-10-26 13:37:37 -07:00
verify-generated-files-remake.sh
verify-generated-kms.sh Add verify script for kms generated file 2018-02-08 01:29:56 +00:00
verify-generated-protobuf.sh Treat staging repos as authoritative for all files 2018-01-09 15:18:27 -08:00
verify-generated-runtime.sh Increment CRI version from v1alpha1 to v1alpha2 2018-02-07 09:06:26 +01:00
verify-generated-swagger-docs.sh Ignore .import-restrictions when checking against generated docs 2017-10-13 07:09:38 -04:00
verify-godep-licenses.sh Route verify-godep-licenses output to stderr 2018-02-07 21:45:02 -08:00
verify-godeps.sh Enforce OWNERS file in Godeps and vendor dirs 2018-02-15 13:30:30 -08:00
verify-gofmt.sh Route verify-gofmt output to stderr 2018-02-07 21:39:49 -08:00
verify-golint.sh
verify-govet.sh
verify-import-boss.sh
verify-imports.sh import-verifier: use yaml for inline comments 2017-10-25 16:53:26 +02:00
verify-linkcheck.sh
verify-no-vendor-cycles.sh
verify-openapi-spec.sh Pipe error message from openapi/swaggerspec verify checks to stderr 2018-02-14 10:31:33 -08:00
verify-pkg-names.sh remove reference to v1alpha1 2017-11-21 13:00:40 -08:00
verify-readonly-packages.sh
verify-spelling.sh add spelling checking script 2018-02-23 09:33:14 +08:00
verify-staging-godeps.sh Add in godeps verification for hack/lib/ and build/ 2018-01-26 13:29:35 -08:00
verify-swagger-spec.sh Pipe error message from openapi/swaggerspec verify checks to stderr 2018-02-14 10:31:33 -08:00
verify-symbols.sh
verify-test-images.sh
verify-test-owners.sh