2022-03-28 11:17:07 +02:00
|
|
|
#!/bin/sh -eu
|
|
|
|
|
|
|
|
REF_EDID_DECODE="${REF_EDID_DECODE:-edid-decode}"
|
|
|
|
DI_EDID_DECODE="${DI_EDID_DECODE:-di-edid-decode}"
|
|
|
|
|
|
|
|
workdir="$(mktemp -d)"
|
|
|
|
cleanup() {
|
|
|
|
rm -rf "$workdir"
|
|
|
|
}
|
|
|
|
trap cleanup EXIT
|
|
|
|
|
|
|
|
for edid in "$@"; do
|
2022-08-29 14:16:36 +02:00
|
|
|
diff="${edid%.edid}.diff"
|
2022-08-02 11:12:42 +02:00
|
|
|
"$REF_EDID_DECODE" --skip-hex-dump --check --skip-sha <"$edid" >"$workdir/ref" || [ $? = 254 ]
|
2022-08-02 11:42:27 +02:00
|
|
|
"$DI_EDID_DECODE" <"$edid" >"$workdir/di" || [ $? = 254 ]
|
2022-03-28 11:17:07 +02:00
|
|
|
if ! diff -u --label ref "$workdir/ref" --label di "$workdir/di" >"$workdir/diff"; then
|
2022-08-29 14:16:36 +02:00
|
|
|
cp "$workdir/diff" "$diff"
|
2022-03-28 11:17:07 +02:00
|
|
|
else
|
2022-08-29 14:16:36 +02:00
|
|
|
rm -f "$diff"
|
2022-03-28 11:17:07 +02:00
|
|
|
fi
|
|
|
|
done
|