-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a wrapper script which calls mkdir to work around bazelbuild/baze…
…l#6393. This allows rules_swig to function under remote builds. Bug: 168150587 Change-Id: I79cc96a4a6119d1d8d286d83fd4807152e722403
- Loading branch information
Showing
3 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package(default_visibility = [ | ||
"//visibility:public", | ||
]) | ||
|
||
sh_binary( | ||
name = "mkdir_wrapper", | ||
srcs = ["mkdir_wrapper.sh"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Wrapper which creates the directory specified as $1, then executing the | ||
# command in $2 with the remaining arguments. | ||
# | ||
# This is to work around https://github.com/bazelbuild/bazel/issues/6393 | ||
|
||
readonly directory="$1" | ||
readonly command="$2" | ||
shift 2 | ||
|
||
mkdir -p "${directory}" | ||
exec "${command}" "$@" |