summaryrefslogtreecommitdiff
path: root/src/protoc-c.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/protoc-c.sh')
-rwxr-xr-xsrc/protoc-c.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/protoc-c.sh b/src/protoc-c.sh
new file mode 100755
index 0000000..163ff7d
--- /dev/null
+++ b/src/protoc-c.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+PROTOC_C=${PROTOC_C:-protoc-c}
+
+mkdir -p .protoc-c_build/
+cp $1 .protoc-c_build/
+cd .protoc-c_build/
+eval $PROTOC_C --c_out=. $(basename $1)
+cd ..
+mv .protoc-c_build/$(basename $2) $2
+rm -rf .protoc-c_build/