File: qhelpgenerator-wrapper

package info (click to toggle)
vc 1.4.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,552 kB
  • sloc: cpp: 19,220; ansic: 15,669; sh: 453; xml: 186; makefile: 30
file content (18 lines) | stat: -rwxr-xr-x 562 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
output="`qhelpgenerator "$@" 2>&1`"
errors="`echo "$output"|grep "Error in line .*: Opening and ending tag mismatch."`"
if echo "$1"|grep -q '\.qhp'; then
  file="$1"
elif echo "$2"|grep -q '\.qhp'; then
  file="$2"
elif echo "$3"|grep -q '\.qhp'; then
  file="$3"
fi
while test -n "$errors"; do
    for i in `echo "$errors"|tac|sed 's/^.* \([0-9]\+\):.*$/\1/'`; do
      sed -i "${i}d" "$file"
    done
    output="`qhelpgenerator "$@" 2>&1`"
    errors="`echo "$output"|grep "Error in line .*: Opening and ending tag mismatch."`"
done
echo "$output"