Debian Codegraph @

debian/tests/check-fonts-urw-base35-scale

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2 #
3 # Check that all files in fonts-urw-base35.scale really exist
4 #
5 # (c) 2018-2023 Roland Rosenfeld <[email protected]>
6
7 scale=/etc/X11/fonts/Type1/fonts-urw-base35.scalescip-shell filesystem . . `/etc/X11/fonts/Type1/fonts-urw-base35.scale`.
8 fontdir=/usr/share/fonts/X11/Type1scip-shell filesystem . . `/usr/share/fonts/X11/Type1`.
9
10 RESULT=0
11 count=0
12 ok=0
13
14 # Check path of all fonts:
15 for f in $(sedscip-shell system . . sed. '1d;s/ .*//' "$scale")
16 do
17 count=$((count+1))
18 f="$fontdir/$f"
19 if [scip-shell system . . `[`. -L "$f" ]
20 then
21 dest=$(readlinkscip-shell system . . readlink. -f "$f")
22 if ! [scip-shell system . . `[`. -f "$dest" ]
23 then
24 RESULT=1
25 echoscip-shell system . . echo. "$f points to $dest, which is not a regular file"
26 else
27 ok=$((ok+1))
28 fi
29 elif ! [scip-shell system . . `[`. -f "$f" ]
30 then
31 RESULT=1
32 echoscip-shell system . . echo. "$f is not a file"
33 else
34 ok=$((ok+1))
35 fi
36 done
37
38 echoscip-shell system . . echo. "$ok/$count fonts okay"
39
40 # Check line count in first line:
41 filecount=$(headscip-shell system . . head. -1 "$scale")
42 if [scip-shell system . . `[`. $count -eq $filecount ]
43 then
44 echoscip-shell system . . echo. "line count $count okay"
45 else
46 RESULT=1
47 fi
48
49 exit $RESULT