aboutsummaryrefslogtreecommitdiffstats
path: root/t.validate-xhtml10
blob: a7cc9e6bfd1564902481e1ee1b0ca05987099c96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#! /bin/sh

# This test script validates all *.html files as XHTML.

set -eu
e=0
fail=
IFS=$(printf '\n\t')

# smoke test validator for XHTML 1.0 Transitional, and skip if it fails
cat - <<'_EOF'  | xmllint 2>/dev/null --nonet --postvalid --noout - || exit 77
<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head><title /></head><body></body></html>
_EOF

for i in "${srcdir}"/*.html ; do
    case "$i" in
	*/fetchmail-man.html) continue ;;
	*/Mailbox-Names-UTF7.html) continue ;;
    esac
    xmllint --postvalid --noout "$i" || { e=1 ; fail="$i${fail:+" "}$fail" ; }
done
if [ $e != 0 ] ; then
    echo >&2 ">>>>> Invalid XHTML in files: ${fail}."
fi
exit $e
an class="m">1 mv $MAILSPOOL/tmp.$$ "$MAILSPOOL/msg.`date +%j%H%M%S`$$.to.${ADDR}_@@${FROM}" || exit 1 exit 0 else for i in $MAILSPOOL/msg.*.to.* do [ -f "$i" ] || continue # TO="`echo \"$i\" | sed 's/^msg.[^.]*.to.//'`" TO=$(basename $i | sed -e 's/^msg.[^.]*.to.//' -e 's/_@@.*$//') FROM=$(basename $i | sed 's/^msg.[^.]*.to.*_@@//') # need the \<\> so for bounces to have a proper from addr echo the to was \<$TO\> and the from \<$FROM\> /usr/lib/sendmail -f \<${FROM}\> -oem "$TO" < "$i" || { echo "Sendmail failed on `basename \"$i\"`" continue } rm -f "$i" done exit 0 fi