From 18c310addf7e19688f6cfc4530026b281ac7e75f Mon Sep 17 00:00:00 2001 From: Maxime Desroches Date: Tue, 23 Jul 2024 23:04:42 -0700 Subject: [PATCH] Update op.sh --- tools/op.sh | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/tools/op.sh b/tools/op.sh index f7caa9d047115b..bbc4ded445acda 100755 --- a/tools/op.sh +++ b/tools/op.sh @@ -73,7 +73,6 @@ function op_check_os() { source /etc/os-release case "$VERSION_CODENAME" in "jammy" | "kinetic" | "noble" | "focal") - OS_VERSION="Ubuntu" echo -e " ↳ [${GREEN}✔${NC}] Ubuntu $VERSION_CODENAME detected.\n" ;; * ) @@ -88,7 +87,6 @@ function op_check_os() { elif [[ "$OSTYPE" == "darwin"* ]]; then echo -e " ↳ [${GREEN}✔${NC}] macos detected.\n" - OS_VERSION="Darwin" else echo -e " ↳ [${RED}✗${NC}] OS type $OSTYPE not supported!" return 1 @@ -154,14 +152,11 @@ function op_install() { op_check_os op_check_python - case "$OS_VERSION" in - "Ubuntu") - $OPENPILOT_ROOT/tools/ubuntu_setup.sh - ;; - "Darwin") - $OPENPILOT_ROOT/tools/mac_setup.sh - ;; - esac + if [[ "$OSTYPE" == "linux-gnu"* ]]; then + $OPENPILOT_ROOT/tools/ubuntu_setup.sh + elif [[ "$OSTYPE" == "darwin"* ]]; then + $OPENPILOT_ROOT/tools/mac_setup.sh + fi git submodule update --init --recursive git lfs pull