19 lines
986 B
Bash
Executable File
19 lines
986 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Assemble the C++ runtime; no Python interpreter is used for packaging or execution.
|
|
set -euo pipefail
|
|
root="$(cd "$(dirname "$0")/.." && pwd)"
|
|
package="$root/orin"
|
|
[[ -x "$root/build/camera_risk" ]] || { echo 'Compile on Orin with scripts/build.sh first.' >&2; exit 1; }
|
|
mkdir -p "$package/build" "$package/config" "$package/annotations" "$package/scripts"
|
|
cp -p "$root/build/camera_risk" "$package/build/"
|
|
cp -p "$root/annotations/"*.json "$package/annotations/"
|
|
# Source and standalone configurations differ only in the engine directory.
|
|
sed 's|../orin/models/engines|../models/engines|' "$root/config/camera.json" > "$package/config/camera.json"
|
|
cp -p "$root/scripts/initialize_camera.sh" "$package/scripts/initialize_camera_impl.sh"
|
|
(
|
|
cd "$package"
|
|
find . -type f ! -path './output/*' ! -path './outputs/*' ! -path './logs/*' ! -name SHA256SUMS -print0 |
|
|
sort -z | xargs -0 sha256sum > SHA256SUMS
|
|
)
|
|
echo "C++ runtime ready: $package/build/camera_risk"
|