summaryrefslogtreecommitdiffstats
path: root/packaging/windows/protoc.bat
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 08:15:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 08:15:20 +0000
commit87d772a7d708fec12f48cd8adc0dedff6e1025da (patch)
tree1fee344c64cc3f43074a01981e21126c8482a522 /packaging/windows/protoc.bat
parentAdding upstream version 1.46.3. (diff)
downloadnetdata-87d772a7d708fec12f48cd8adc0dedff6e1025da.tar.xz
netdata-87d772a7d708fec12f48cd8adc0dedff6e1025da.zip
Adding upstream version 1.47.0.upstream/1.47.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/windows/protoc.bat')
-rw-r--r--packaging/windows/protoc.bat9
1 files changed, 9 insertions, 0 deletions
diff --git a/packaging/windows/protoc.bat b/packaging/windows/protoc.bat
new file mode 100644
index 00000000..fe7a76f2
--- /dev/null
+++ b/packaging/windows/protoc.bat
@@ -0,0 +1,9 @@
+@echo off
+::
+:: The problem with /usr/bin/protoc is that it accepts colon separated (:) paths at its parameters.
+:: This makes C:/ being parsed as 2 paths: C and /, which of course both fail.
+:: To overcome this problem, we use bash_execute.sh, which replaces all occurences of C: with /c.
+::
+set "batch_dir=%~dp0"
+set "batch_dir=%batch_dir:\=/%"
+C:\msys64\usr\bin\bash.exe %batch_dir%/bash_execute.sh protoc %*