File tree 3 files changed +35
-2
lines changed
3 files changed +35
-2
lines changed Original file line number Diff line number Diff line change
1
+ * .cmd text eol =crlf
Original file line number Diff line number Diff line change
1
+ load ("@bazel_skylib//rules:native_binary.bzl" , "native_binary" )
2
+
1
3
licenses (["notice" ])
2
4
3
- sh_binary (
5
+ native_binary (
4
6
name = "mkdir_and_run" ,
5
- srcs = ["mkdir_and_run.sh" ],
7
+ src = select ({
8
+ "@bazel_tools//src/conditions:host_windows" : "mkdir_and_run.cmd" ,
9
+ "//conditions:default" : "mkdir_and_run.sh" ,
10
+ }),
11
+ out = select ({
12
+ "@bazel_tools//src/conditions:host_windows" : "mkdir_and_run.cmd" ,
13
+ "//conditions:default" : "mkdir_and_run.sh" ,
14
+ }),
6
15
visibility = ["//visibility:public" ],
7
16
)
8
17
Original file line number Diff line number Diff line change
1
+
2
+ @ echo off
3
+
4
+ setlocal
5
+
6
+ set argc = 0
7
+ FOR %%a IN (%* ) DO SET /A argc += 1
8
+
9
+ IF %argc% LSS 2 (
10
+ echo ERROR: Need at least two arguments. 1 >& 2
11
+ exit /b 1
12
+ )
13
+
14
+ set location = %1
15
+ shift
16
+
17
+ set executable = %1
18
+ shift
19
+
20
+ md %location:/ =\ %
21
+ " %executable:/ =\ % " %*
22
+
23
+ endlocal
You can’t perform that action at this time.
0 commit comments