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"
|