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 "$@"