summaryrefslogtreecommitdiff
path: root/src/protoc-c.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/protoc-c.sh.in')
-rw-r--r--src/protoc-c.sh.in14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/protoc-c.sh.in b/src/protoc-c.sh.in
new file mode 100644
index 0000000..788d743
--- /dev/null
+++ b/src/protoc-c.sh.in
@@ -0,0 +1,14 @@
+#!/bin/sh
+# @configure_input@
+
+PROTOC_C=@PROTOC_C@
+
+build_dir=".protoc-c_build_$(basename $2)/"
+
+mkdir -p "${build_dir}"
+cp $1 "${build_dir}"
+cd "${build_dir}"
+eval $PROTOC_C --c_out=. $(basename $1)
+cd ..
+mv "${build_dir}/$(basename $2)" $2
+rm -rf "${build_dir}"