diff options
Diffstat (limited to 'scripts/bootstrap/buildenv.sh')
-rwxr-xr-x | scripts/bootstrap/buildenv.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/bootstrap/buildenv.sh b/scripts/bootstrap/buildenv.sh index 8dfb6fe917..0689b95919 100755 --- a/scripts/bootstrap/buildenv.sh +++ b/scripts/bootstrap/buildenv.sh @@ -301,3 +301,15 @@ function get_bind_target() { $BAZEL --bazelrc=${BAZELRC} --nomaster_bazelrc ${BAZEL_DIR_STARTUP_OPTIONS} \ query "deps($1, 1) - $1" } + +# Create a link for a directory on the filesystem +function link_dir() { + local source=$1 + local dest=$2 + + if [[ "${PLATFORM}" == "windows" ]]; then + cmd.exe /C "mklink /J \"$(cygpath -w "$dest")\" \"$(cygpath -w "$source")\"" + else + ln -s "${source}" "${dest}" + fi +} |