Skip to content

Commit

Permalink
docker_shell: Rename and change WORKSPACE_EXECROOT
Browse files Browse the repository at this point in the history
Signed-off-by: Eryk Szpotanski <[email protected]>
  • Loading branch information
eszpotanski committed Jun 14, 2024
1 parent 2bc8919 commit fa4ef2b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docker_shell.sh → docker_shell
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ function handle_sigterm() {
docker container rm -f "bazel-orfs-$uuid" || true
}

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
WORKSPACE_EXECROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

if [[ $DIR == */external/bazel-orfs~override ]]; then
WORKSPACE_ROOT=$(realpath $DIR/../../../../../../..)
if [[ $WORKSPACE_EXECROOT == */external/bazel-orfs~override ]]; then
WORKSPACE_ROOT=$(realpath -L $WORKSPACE_EXECROOT/../../../..)
else
WORKSPACE_ROOT=$(realpath $DIR/../../../../..)
WORKSPACE_ROOT=$(realpath $WORKSPACE_EXECROOT/../..)
fi
WORKSPACE_EXECROOT=$WORKSPACE_ROOT/execroot/_main
WORKSPACE_EXTERNAL=$WORKSPACE_ROOT/external

# Automatically mount bazel-orfs directory if it is used as module with local_path_override
if [[ $DIR == */external/bazel-orfs~override ]]; then
if [[ $WORKSPACE_EXECROOT == */external/bazel-orfs~override ]]; then
BAZEL_ORFS_DIR=$(realpath $WORKSPACE_ROOT/external/bazel-orfs~override)
DOCKER_ARGS="$DOCKER_ARGS -v $BAZEL_ORFS_DIR:$BAZEL_ORFS_DIR"
WORKSPACE_EXECROOT=$(realpath -L $WORKSPACE_EXECROOT/../..)
fi

XSOCK=/tmp/.X11-unix_$uuid
Expand Down

0 comments on commit fa4ef2b

Please sign in to comment.