summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/pseudomuto/protoc-gen-doc/script/entrypoint.sh
blob: d5ea048cef99ca3e3560d59402f3fdf8dd2ff99c (plain) (blame)
1
2
3
4
5
6
7
8
9
#!/bin/bash
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

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