335N/A# The contents of this file are subject to the terms of the 335N/A# Common Development and Distribution License (the "License"). 335N/A# You may not use this file except in compliance with the License. 335N/A# See the License for the specific language governing permissions 335N/A# and limitations under the License. 335N/A# When distributing Covered Code, include this CDDL HEADER in each 335N/A# If applicable, add the following below this CDDL HEADER, with the 335N/A# fields enclosed by brackets "[]" replaced with your own identifying 335N/A# information: Portions Copyright [yyyy] [name of copyright owner] 335N/A# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 335N/A# Find the PPD files delivered by foomatic that Solaris does not support. 335N/A# There are two reasons for non-support: 335N/A# files are removed and not delivered 335N/A# 2. The driver used by the PPD file must be brought downand compiled and 335N/A# Solaris has not chosen to do so. In that case the PPD file is delivered, 335N/A# but not included in the generated cache file. 335N/A# review. The catchall file, ppdsnomatch, should be empty. If not, a new 335N/A# case is needed in this script. The other files are there for debugging 335N/A# drivers come in several flavors: gs built in, gs uniprint, postscript, 335N/A# hpijs, and then the several other drivers. 335N/A# Drivers are noted in many PPD files with driverType. To sort these, look 335N/A# Drivers are also noted in the name of the ppd file. This is used 335N/A# to cull out postscript, hpijs, and pxlmono . These do not reliably 335N/A# use driverType. note: pxlmono driver is a gs built-in but many of the 335N/A# ppd files that use this driver do not utilize the driverType line. 335N/A# driverType I/IJS: "" is not reliable for hpijs as not used in many ppds. 335N/A# driverType F/Filter: "" denotes ppd files that use GhostScript and 335N/A# then pipe that output to one or more other drivers. These will only be 335N/A# supported if Solaris compiles and delivers these drivers. 335N/A# Make sure that there are no undefined variables 335N/Aif [ -z
"${1-}" ] || [ -z
"${2-}" ] ||
335N/A [ -z
"${3-}" ] || [ -z
"${4-}" ];
then 335N/A echo "Usage: $0 build-dir tree-of-ppds cache-file nolicense-file" 335N/A# Where PPD files are located 335N/A# Cache file to be created 335N/A# Base install path for PPD files 335N/A# Script will fail if set 335N/A# files which should be included in the cache 335N/A## That means the PPD will be included in ## generated cache. Function uses 335N/A## global variables $i and $j. Function expects that we are already in 335N/A # Add the file to the cache 335N/A # change / to \/ for sed 335N/A## process PPD supported file. 335N/A## Handle PPD files NOT supported and thus included in the cache 335N/A## Handle PPD files for which we don't know how to decide whether it's 335N/A echo "file '$i/$j' did not match any rule" 335N/A# Go to directory with PPD files 335N/A# Walk through all the PPD files available 335N/A # First detect all files listed in the "nolicense" file 335N/A echo "Removing file '$j' because it is listed in 'nolicense' file" 335N/A # The following cases pull out supported drivers 335N/A # HPLIP (hpijs) supplies it's own Foomatic PPD files 335N/A # These are the unsupported printers unless 335N/A # we build and deliver the drivers 335N/A # No match : this should not happen