#!/bin/sh

set -e

rc=0
for f in $(dpkg -L linux-firmware-raspi); do
    if [ -L "$f" ]; then
        if ! [ -e "$f" ]; then
            echo "Broken symlink: $f->$(readlink "$f")"
            rc=1
        fi
    fi
done

exit $rc
