Files
opendbc-meb/setup.sh
Adeeb Shihadeh df0f84b160 libsafety: fix building with mutation env (#3001)
* build_env

* default

* conditional

* need it there

* try that

* fix

* rm those
2025-12-29 17:14:04 -08:00

33 lines
909 B
Bash
Executable File

#!/bin/bash
set -e
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
# TODO: why doesn't uv do this?
export PYTHONPATH=$BASEDIR
# *** dependencies install ***
if [ "$(uname -s)" = "Linux" ]; then
# TODO: add macOS support
if ! command -v "mull-runner-17" > /dev/null 2>&1; then
curl -1sLf 'https://dl.cloudsmith.io/public/mull-project/mull-stable/setup.deb.sh' | sudo -E bash
sudo apt-get update && sudo apt-get install -y clang-17 mull-17
fi
fi
if ! command -v uv &>/dev/null; then
echo "'uv' is not installed. Installing 'uv'..."
curl -LsSf https://astral.sh/uv/install.sh | sh
# must source this after install on some platforms
if [ -f $HOME/.local/bin/env ]; then
source $HOME/.local/bin/env
fi
fi
export UV_PROJECT_ENVIRONMENT="$BASEDIR/.venv"
uv sync --all-extras
source "$PYTHONPATH/.venv/bin/activate"
$BASEDIR/opendbc/safety/tests/misra/install.sh