File: filter-xmlto.sh

package info (click to toggle)
xorg-server 2:1.20.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 43,244 kB
  • sloc: ansic: 372,231; xml: 17,683; sh: 5,277; objc: 3,482; makefile: 3,285; python: 514; yacc: 483; cpp: 479; lex: 281; asm: 214; awk: 52; perl: 5
file content (21 lines) | stat: -rwxr-xr-x 680 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
#
# Run the xmlto command, filtering its output to
# reduce the amount of useless warnings in the build log.
#
# Exit with the status of the xmlto process, not the status of the
# output filtering commands
#
# This is a bit twisty, but avoids any temp files by using pipes for
# everything. It routes the command output through file
# descriptor 4 while sending the (numeric) exit status through
# standard output.
#
(((("$@" 2>&1; echo $? >&3) |
       grep -v overflows |
       grep -v 'Making' |
       grep -v 'hyphenation' |
       grep -v 'Font.*not found' |
       grep -v '/tmp/xml' |
       grep -v Rendered >&4) 3>&1) |
     (read status; exit $status)) 4>&1