blob: 8b03b76b5f91a711fa504611b49966b3205c8176 [file] [log] [blame]
set +e
CURRENT_PATH=$PWD
i=0
while [ ! -f "WORKSPACE" ]
do
cd ..
((i++))
if [ "$PWD" = "/home" ]; then
break
fi
done
BAZEL_WORKSPACE_PATH=$PWD
if [ "$PWD" = "/home" ]; then
echo "bazel path not found"
BAZEL_WORKSPACE_PATH=$CURRENT_PATH
fi
export BAZEL_WORKSPACE_PATH=$PWD
echo "use bazel path:"$BAZEL_WORKSPACE_PATH
# go back to the current dir
cd $CURRENT_PATH