1#!/bin/sh 2 3make ppd-clean ppd-global ppd-nls ppd-nonls 4 5# Most non-Macintosh systems won't have the Macintosh-specific profiles 6# installed in Macintosh-specific locations. 7# 8# Also, a number of our media sizes aren't named correctly, but we'll 9# accept those issues rather than cluttering the namespace further and/or 10# changing tag names. 11cupstestppdopts='-I profiles -W sizes' 12 13ppd_count=`find ppd \( -name '*.ppd.gz' -o -name '*.ppd' \) -print | wc -l` 14 15failures="`find ppd -name '*.ppd*' -print | xargs cupstestppd $cupstestppdopts |grep 'FAIL$' | awk -F: '{print $1}'`" 16 17if [ -z "$failures" ] ; then 18 echo "All $ppd_count PPD files pass" 19 exit 0 20fi 21 22# Use this with "normal" PPD files without translated numbers. 23#echo $failures | xargs cupstestppd $cupstestppdopts 2>&1 | egrep -v 'Missing "[a-z][a-z](_[A-Z][A-Z])?" translation string for option Stp((Brightness|Contrast|Saturation), choice None|([a-zA-Z0-9]+, choice (-?[0-9]+)))!$' |egrep -v 'Missing cupsICCProfile file' 24 25# Use this with PPD files with translated numbers (genppd -N) 26# With normal globalized PPD files this will yield hundreds of megabytes 27# of errors. 28echo $failures | xargs cupstestppd $cupstestppdopts 2>&1 |egrep -v 'Missing cupsICCProfile file' 29 30fail_count=`echo "$failures" | wc -l` 31echo "$fail_count/$ppd_count fail" 32exit 1 33