#!/usr/bin/env bash set -euo pipefail root="$(cd "$(dirname "$0")/.." && pwd)" [[ -x "$root/build/camera_risk" && -x "$root/build/door_mask_tool" ]] || { echo 'Build on Orin first.' >&2; exit 1; } cp -p "$root/build/camera_risk" "$root/orin/build/" cp -p "$root/build/door_mask_tool" "$root/orin/build/" cp -p "$root/annotate_door_mask.sh" "$root/orin/" cp -p "$root/config/door_mask.json" "$root/orin/config/" sed 's|../orin/engines|../engines|' "$root/config/camera.json" > "$root/orin/config/camera.json" ( cd "$root/orin" find . \( -type f -o -type l \) ! -path './output/*' ! -path './outputs/*' ! -path './logs/*' ! -name SHA256SUMS -print0 | sort -z | xargs -0 sha256sum > SHA256SUMS )