mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-08-24 01:43:44 +08:00
op.sh: fallback to script's own location for openpilot root (#37326)
op: fallback to script's own location for openpilot root
This commit is contained in:
+2
-1
@@ -77,7 +77,8 @@ function op_get_openpilot_dir() {
|
||||
done
|
||||
|
||||
# Fallback to hardcoded directories if not found
|
||||
for dir in "$HOME/openpilot" "/data/openpilot"; do
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
|
||||
for dir in "${SCRIPT_DIR%/tools}" "$HOME/openpilot" "/data/openpilot"; do
|
||||
if [[ -f "$dir/launch_openpilot.sh" ]]; then
|
||||
OPENPILOT_ROOT="$dir"
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user