Skip to content

Commit ab4b774

Browse files
Merge pull request mavlink#391 from mattes-bru/run_protoc_on_mac
macOS support for run_protoc.sh
2 parents 0d8ca14 + 4fde88a commit ab4b774

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

other/tools/run_protoc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ command -v protoc-gen-mavsdk > /dev/null || {
2424
}
2525

2626
function snake_case_to_camel_case {
27-
echo $1 | sed -r 's/(^|_)([a-z])/\U\2/g'
27+
echo $1 | awk -v FS="_" -v OFS="" '{for (i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) substr($i,2)} 1'
2828
}
2929

3030
function generate {

0 commit comments

Comments
 (0)