Skip to content

Commit

Permalink
Use globstar for processing deeper structures (#437)
Browse files Browse the repository at this point in the history
Fixes #380
  • Loading branch information
Falco20019 authored Nov 13, 2024
1 parent affddd4 commit b33b1e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion script/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash
shopt -s globstar
set -euo pipefail

# this is required because of the wildcard expansion. Passing protos/*.proto in CMD gets escaped -_-. So instead leaving
# off the [FILES] will put protos/*.proto in from here which will expand correctly.
args=("$@")
if [ "${#args[@]}" -lt 2 ]; then args+=(protos/*.proto); fi
if [ "${#args[@]}" -lt 2 ]; then args+=(protos/**/*.proto); fi

exec protoc -I/usr/include -Iprotos --doc_out=/out "${args[@]}"

0 comments on commit b33b1e8

Please sign in to comment.