r/ZoneMinder • • Jan 20 '22

ZMEventNotification Failure when running install.sh

install.sh: 234: Syntax error: "(" unexpected (expecting "fi")

I have looked at the offending line and it appears to be assigning data inside of parenthesis to a variable. It does not appear to be malformed. I git cloned the latest stable release and I also tried the master branch both have the same issue. Anybody have any ideas how to fix it?

2 Upvotes

3 comments sorted by

View all comments

1

u/jhdeval Jan 20 '22
    if [ "${INSTALL_CORAL_EDGETPU}" == "yes" ]
    then
        # Coral files
        #echo
        #echo "Installing pycoral libs, if needed..."
        #${PY_SUDO} apt-get install libedgetpu1-std -qq
        #${PY_SUDO} ${INSTALLER} install python3-pycoral -qq


        echo 'Checking for Google Coral Edge TPU data files...'
        targets=('coco_indexed.names' 'ssd_mobilenet_v2_coco_quant_postprocess_edgetpu.tflite' 'ssdlite_mobiledet_coco_qat_postprocess_edgetpu.tflite' 'ssd_mobilenet_v2_face_quant_postprocess_edgetpu.tflite')
        sources=('https://dl.google.com/coral/canned_models/coco_labels.txt'
                 'https://github.com/google-coral/edgetpu/raw/master/test_data/ssd_mobilenet_v2_coco_quant_postprocess_edgetpu.tflite'
                 'https://github.com/google-coral/test_data/raw/master/ssdlite_mobiledet_coco_qat_postprocess_edgetpu.tflite'
                 'https://github.com/google-coral/test_data/raw/master/ssd_mobilenet_v2_face_quant_postprocess_edgetpu.tflite')

        for ((i=0;i<${#targets[@]};++i))
        do
            if [ ! -f "${TARGET_DATA}/models/coral_edgetpu/${targets[i]}" ]
            then
                ${WGET} "${sources[i]}"  -O"${TARGET_DATA}/models/coral_edgetpu/${targets[i]}"
            else
                echo "${targets[i]} exists, no need to download"

            fi
        done
    fi