Skip to content

Commit 6f62048

Browse files
committed
Makefile: fix the capitalize not working in Bash 3.2.57(1)-release
Ensures correct platform names in artifact filenames. Signed-off-by: Norio Nomura <[email protected]>
1 parent 5f07a1d commit 6f62048

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ generate:
465465
.PHONY: artifact
466466

467467
# returns the capitalized string of $(1).
468-
capitalize = $(shell bash -c 'word="$(1)"; echo $${word^}')
468+
capitalize = $(shell echo "$(1)"|awk '{print toupper(substr($$0,1,1)) tolower(substr($$0,2))}')
469469

470470
# returns the architecture name converted from GOARCH to GNU coreutils uname -m.
471471
to_uname_m = $(foreach arch,$(1),$(shell echo $(arch) | sed 's/amd64/x86_64/' | sed 's/arm64/aarch64/'))

0 commit comments

Comments
 (0)