diff --git a/hack/.shellcheck_failures b/hack/.shellcheck_failures index 3fbdac45e6..1f3559330b 100644 --- a/hack/.shellcheck_failures +++ b/hack/.shellcheck_failures @@ -48,9 +48,7 @@ ./hack/update-generated-kms-dockerized.sh ./hack/update-generated-protobuf-dockerized.sh ./hack/update-generated-runtime-dockerized.sh -./hack/update-gofmt.sh ./hack/update-openapi-spec.sh -./hack/update-translations.sh ./hack/update-vendor-licenses.sh ./hack/update-vendor.sh ./hack/verify-api-groups.sh diff --git a/hack/update-gofmt.sh b/hack/update-gofmt.sh index 33de85bbf0..9a9aab7bf4 100755 --- a/hack/update-gofmt.sh +++ b/hack/update-gofmt.sh @@ -20,7 +20,7 @@ set -o errexit set -o nounset set -o pipefail -KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. +KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. source "${KUBE_ROOT}/hack/lib/init.sh" kube::golang::verify_go_version @@ -44,4 +44,4 @@ find_files() { } GOFMT="gofmt -s -w" -find_files | xargs ${GOFMT} +find_files | xargs "${GOFMT}" diff --git a/hack/update-translations.sh b/hack/update-translations.sh index 0cc7b14d8a..81fe810f8f 100755 --- a/hack/update-translations.sh +++ b/hack/update-translations.sh @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. +KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. source "${KUBE_ROOT}/hack/lib/util.sh" KUBECTL_FILES="pkg/kubectl/cmd/*.go pkg/kubectl/cmd/*/*.go" @@ -61,7 +61,7 @@ fi if [[ "${generate_pot}" == "true" ]]; then echo "Extracting strings to POT" - go-xgettext -k=i18n.T ${KUBECTL_FILES} > tmp.pot + go-xgettext -k=i18n.T "${KUBECTL_FILES}" > tmp.pot perl -pi -e 's/CHARSET/UTF-8/' tmp.pot perl -pi -e 's/\\\(/\\\\\(/g' tmp.pot perl -pi -e 's/\\\)/\\\\\)/g' tmp.pot @@ -78,10 +78,10 @@ fi if [[ "${generate_mo}" == "true" ]]; then echo "Generating .po and .mo files" for x in translations/*/*/*/*.po; do - msgcat -s ${x} > tmp.po - mv tmp.po ${x} + msgcat -s "${x}" > tmp.po + mv tmp.po "${x}" echo "generating .mo file for: ${x}" - msgfmt ${x} -o "$(dirname ${x})/$(basename ${x} .po).mo" + msgfmt "${x}" -o "$(dirname "${x}")/$(basename "${x}" .po).mo" done fi