22 lines
503 B
Plaintext
22 lines
503 B
Plaintext
|
|
#!/bin/bash
|
||
|
|
|
||
|
|
# ruby protocol buffers
|
||
|
|
# http://code.google.com/p/ruby-protobuf/
|
||
|
|
RUBY_OUT=$TARGET/ruby
|
||
|
|
|
||
|
|
# we exit with 0; treat ruby as optional at the moment
|
||
|
|
command -v "bundle" >/dev/null 2>&1 || { echo >&2 "bundle is required but not installed. Skipping ruby protocol buffers."; exit 0; }
|
||
|
|
|
||
|
|
# creates a bin folder with 'rprotoc' command inside
|
||
|
|
bundle install --binstubs
|
||
|
|
|
||
|
|
# die on error at this point
|
||
|
|
set -e
|
||
|
|
|
||
|
|
for i in "${PROTO_FILES[@]}"
|
||
|
|
do
|
||
|
|
bin/rprotoc --proto_path $SRC --out $RUBY_OUT "$i"
|
||
|
|
done
|
||
|
|
|
||
|
|
|