mirror of https://github.com/k3s-io/k3s
fix shellcheck failures of hack/update-gofmt.sh hack/update-translations.sh
parent
fbc28fd15f
commit
0f09703c48
|
@ -48,9 +48,7 @@
|
||||||
./hack/update-generated-kms-dockerized.sh
|
./hack/update-generated-kms-dockerized.sh
|
||||||
./hack/update-generated-protobuf-dockerized.sh
|
./hack/update-generated-protobuf-dockerized.sh
|
||||||
./hack/update-generated-runtime-dockerized.sh
|
./hack/update-generated-runtime-dockerized.sh
|
||||||
./hack/update-gofmt.sh
|
|
||||||
./hack/update-openapi-spec.sh
|
./hack/update-openapi-spec.sh
|
||||||
./hack/update-translations.sh
|
|
||||||
./hack/update-vendor-licenses.sh
|
./hack/update-vendor-licenses.sh
|
||||||
./hack/update-vendor.sh
|
./hack/update-vendor.sh
|
||||||
./hack/verify-api-groups.sh
|
./hack/verify-api-groups.sh
|
||||||
|
|
|
@ -20,7 +20,7 @@ set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||||
source "${KUBE_ROOT}/hack/lib/init.sh"
|
source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||||
|
|
||||||
kube::golang::verify_go_version
|
kube::golang::verify_go_version
|
||||||
|
@ -44,4 +44,4 @@ find_files() {
|
||||||
}
|
}
|
||||||
|
|
||||||
GOFMT="gofmt -s -w"
|
GOFMT="gofmt -s -w"
|
||||||
find_files | xargs ${GOFMT}
|
find_files | xargs "${GOFMT}"
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||||
source "${KUBE_ROOT}/hack/lib/util.sh"
|
source "${KUBE_ROOT}/hack/lib/util.sh"
|
||||||
|
|
||||||
KUBECTL_FILES="pkg/kubectl/cmd/*.go pkg/kubectl/cmd/*/*.go"
|
KUBECTL_FILES="pkg/kubectl/cmd/*.go pkg/kubectl/cmd/*/*.go"
|
||||||
|
@ -61,7 +61,7 @@ fi
|
||||||
|
|
||||||
if [[ "${generate_pot}" == "true" ]]; then
|
if [[ "${generate_pot}" == "true" ]]; then
|
||||||
echo "Extracting strings to POT"
|
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/CHARSET/UTF-8/' tmp.pot
|
||||||
perl -pi -e 's/\\\(/\\\\\(/g' tmp.pot
|
perl -pi -e 's/\\\(/\\\\\(/g' 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
|
if [[ "${generate_mo}" == "true" ]]; then
|
||||||
echo "Generating .po and .mo files"
|
echo "Generating .po and .mo files"
|
||||||
for x in translations/*/*/*/*.po; do
|
for x in translations/*/*/*/*.po; do
|
||||||
msgcat -s ${x} > tmp.po
|
msgcat -s "${x}" > tmp.po
|
||||||
mv tmp.po ${x}
|
mv tmp.po "${x}"
|
||||||
echo "generating .mo file for: ${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
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue