From fa4ef2b8b65385fe893afabef4ac40758b536f7f Mon Sep 17 00:00:00 2001 From: Eryk Szpotanski Date: Fri, 14 Jun 2024 17:50:16 +0200 Subject: [PATCH] docker_shell: Rename and change WORKSPACE_EXECROOT Signed-off-by: Eryk Szpotanski --- docker_shell.sh => docker_shell | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename docker_shell.sh => docker_shell (90%) diff --git a/docker_shell.sh b/docker_shell similarity index 90% rename from docker_shell.sh rename to docker_shell index 7e5c5fd3..1ba56b54 100755 --- a/docker_shell.sh +++ b/docker_shell @@ -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