File: edid-decode-check.sh

package info (click to toggle)
libdisplay-info 0.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,460 kB
  • sloc: ansic: 10,055; python: 294; sh: 131; makefile: 3
file content (20 lines) | stat: -rwxr-xr-x 330 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh -eu

workdir="$(mktemp -d)"
cleanup() {
	rm -rf "$workdir"
}
trap cleanup EXIT

edid="$1"
diff="${edid%.edid}.diff"
ref="${edid%.edid}.ref"

cp "$ref" "$workdir/ref"
"$DI_EDID_DECODE" <"$edid" >"$workdir/di" || [ $? = 254 ]

if [ -f "$diff" ]; then
	patch "$workdir/ref" "$diff"
fi

diff -u "$workdir/ref" "$workdir/di"