From 40fb31e6f6a363959d8f3ba3e238c9104f0789fa Mon Sep 17 00:00:00 2001 From: Bel LaPointe <153096461+breel-render@users.noreply.github.com> Date: Wed, 4 Sep 2024 16:44:40 -0600 Subject: [PATCH] gr --- .../moonfire-nvr/movement_detection_via_api_ffmpeg.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/testdata/moonfire-nvr/movement_detection_via_api_ffmpeg.sh b/testdata/moonfire-nvr/movement_detection_via_api_ffmpeg.sh index 1616374..d0e0f85 100644 --- a/testdata/moonfire-nvr/movement_detection_via_api_ffmpeg.sh +++ b/testdata/moonfire-nvr/movement_detection_via_api_ffmpeg.sh @@ -60,7 +60,7 @@ main() { threshold="$max_of_last_n" fi done - threshold="$(perl -e "print $threshold + 0.005")" + threshold="$(_perl -e "print $threshold + 0.005")" local has_change=false if [ "${#flattened_scores[@]}" -lt 10 ]; then @@ -99,4 +99,12 @@ _date() { fi } +_perl() { + if which perl &> /dev/null; then + perl "$@" + else + /var/services/homes/squeaky2x3/.nix-profile/bin/perl "$@" + fi +} + main "$@"