#! /bin/csh
#
# Brother Print filter
# Copyright (C) 2003 Brother. Industries, Ltd.

# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA  02111-1307  USA
#

if($1 == "uninstall")then
  rm /usr/share/cups/model/brmfc3820cn_cups.ppd
  rm /usr/lib/cups/filter/brlpdwrapperMFC3820CN
  exit(1)
endif
if($1 == "help" || $1 == "-h")then
  echo   'option -h : help'
  echo   '       -i : install'
  echo   '       -e : uninstall'
  exit(1)
endif
mkdir -p /usr/local/Brother/filter
mkdir -p /usr/lib/cups/filter

if(!(-e "/usr/local/Brother/lpd/filterMFC3820CN"))then
  echo "ERROR : Brother LPD filter is not installed."
  exit(1)
endif
rm -f /usr/share/cups/model/brmfc3820cn_cups.ppd
set  ppd_file_name=/usr/share/cups/model/brmfc3820cn_cups.ppd

echo '*PPD-Adobe: "4.3"'                                                                >>$ppd_file_name
echo '*% '                                                                              >>$ppd_file_name
echo '*%================================================'                               >>$ppd_file_name
echo '*%	Copyright(C) 2004 Brother Industries, Ltd.'                                    >>$ppd_file_name
echo '*%	"Brother MFC-3820CN CUPS"'                                                     >>$ppd_file_name
echo '*%================================================ '                              >>$ppd_file_name
echo '*% '                                                                              >>$ppd_file_name
echo '*%==== General Information Keywords ========================'                     >>$ppd_file_name
echo '*FormatVersion: "4.3"'                                                            >>$ppd_file_name
echo '*FileVersion: "1.00"'                                                             >>$ppd_file_name
echo '*LanguageVersion: English'                                                        >>$ppd_file_name
echo '*LanguageEncoding: ISOLatin1'                                                     >>$ppd_file_name
echo '*PCFileName: "MFC3820CN.PPD"'                                                     >>$ppd_file_name
echo '*Manufacturer: "Brother"'                                                         >>$ppd_file_name
echo '*Product: "(Brother MFC-3820CN)"'                                                 >>$ppd_file_name
echo '*1284DeviceID: "MFG:Brother;MDL:MFC-3820CN"'                                      >>$ppd_file_name
echo '*cupsVersion: 1.1'                                                                >>$ppd_file_name
echo '*cupsManualCopies: False'                                                         >>$ppd_file_name
echo '*cupsFilter: "application/vnd.cups-postscript 0 brlpdwrapperMFC3820CN"'           >>$ppd_file_name
echo '*cupsModelNumber: 5'                                                              >>$ppd_file_name
echo '*ModelName: "Brother MFC-3820CN"'                                                 >>$ppd_file_name
echo '*ShortNickName: "Brother MFC-3820CN"'                                             >>$ppd_file_name
echo '*NickName: "Brother MFC-3820CN CUPS v1.1"'                                        >>$ppd_file_name
echo '*PSVersion: "(3010.106) 3"'                                                       >>$ppd_file_name
echo '*%'                                                                               >>$ppd_file_name
echo '*%==== Basic Device Capabilities ============='                                   >>$ppd_file_name
echo '*LanguageLevel: "3"'                                                              >>$ppd_file_name
echo '*ColorDevice: True'                                                               >>$ppd_file_name
echo '*DefaultColorSpace: RGB'                                                          >>$ppd_file_name
echo '*FileSystem: False'                                                               >>$ppd_file_name
echo '*Throughput: "12"'                                                                >>$ppd_file_name
echo '*LandscapeOrientation: Plus90'                                                    >>$ppd_file_name
echo '*VariablePaperSize: False'                                                        >>$ppd_file_name
echo '*TTRasterizer: Type42'                                                            >>$ppd_file_name
echo '*FreeVM: "1700000"'                                                               >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*DefaultOutputOrder: Reverse'                                                     >>$ppd_file_name
echo '*%==== Installable Options ==================='                                   >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*%===== InputSlot vs PaperSize ========='                                         >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*%==== Media Selection ======================'                                    >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*OpenUI *PageSize/Media Size: PickOne'                                            >>$ppd_file_name
echo '*OrderDependency: 18 AnySetup *PageSize'                                          >>$ppd_file_name
echo '*DefaultPageSize: BrLetter'                                                       >>$ppd_file_name
echo '*PageSize BrA4/A4:				"<</PageSize[595 842]/ImagingBBox null>>setpagedevice"'                                             >>$ppd_file_name
echo '*PageSize BrLetter/Letter:			"<</PageSize[612 792]/ImagingBBox null>>setpagedevice"'                                      >>$ppd_file_name
echo '*PageSize BrLegal/Legal:			"<</PageSize[612 1008]/ImagingBBox null>>setpagedevice"'                                       >>$ppd_file_name
echo '*PageSize BrExecutive/Executive: 		"<</PageSize[522 756]/ImagingBBox null>>setpagedevice"'                                >>$ppd_file_name
echo '*PageSize BrJISB5/JIS B5:			"<</PageSize[516 729]/ImagingBBox null>>setpagedevice"'                                       >>$ppd_file_name
echo '*PageSize BrA5/A5:				"<</PageSize[420 595]/ImagingBBox null>>setpagedevice"'                                             >>$ppd_file_name
echo '*PageSize BrA6/A6:				"<</PageSize[298 419]/ImagingBBox null>>setpagedevice"'                                             >>$ppd_file_name
echo '*PageSize BrPostC4x6/Photo:			"<</PageSize[288 432]/ImagingBBox null>>setpagedevice"'                                     >>$ppd_file_name
echo '*PageSize BrIndexC5x8/Index Card:		"<</PageSize[360 576]/ImagingBBox null>>setpagedevice"'                                >>$ppd_file_name
echo '*PageSize BrPhotoL/Photo L: 			"<</PageSize[252 360]/ImagingBBox null>>setpagedevice"'                                    >>$ppd_file_name
echo '*PageSize BrPhoto2L/Photo 2L: 			"<</PageSize[360 504]/ImagingBBox null>>setpagedevice"'                                  >>$ppd_file_name
echo '*PageSize BrHagaki/PostCard 1: 			"<</PageSize[283 419]/ImagingBBox null>>setpagedevice"'                                 >>$ppd_file_name
echo '*PageSize BrDoubleHagaki/PostCard 2(Double): 	"<</PageSize[420 567]/ImagingBBox null>>setpagedevice"'                     >>$ppd_file_name
echo '*PageSize BrC5/C5 Envelope: 			"<</PageSize[459 649]/ImagingBBox null>>setpagedevice"'                                    >>$ppd_file_name
echo '*PageSize BrDL/DL Envelope: 			"<</PageSize[312 624]/ImagingBBox null>>setpagedevice"'                                    >>$ppd_file_name
echo '*PageSize BrCom10/Com-10:			"<</PageSize[297 684]/ImagingBBox null>>setpagedevice"'                                       >>$ppd_file_name
echo '*PageSize BrMonarch/Monarch:			"<</PageSize[279 540]/ImagingBBox null>>setpagedevice"'                                    >>$ppd_file_name
echo '*PageSize BrYokei4/JE4 Envelope: 		"<</PageSize[297 664]/ImagingBBox null>>setpagedevice"'                                >>$ppd_file_name
echo '*CloseUI: *PageSize'                                                              >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*OpenUI *PageRegion: PickOne'                                                     >>$ppd_file_name
echo '*OrderDependency: 18 AnySetup *PageRegion'                                        >>$ppd_file_name
echo '*DefaultPageRegion: BrLetter'                                                     >>$ppd_file_name
echo '*PageRegion BrA4/A4:				"<</PageSize[595 842]/ImagingBBox null>>setpagedevice"'                                           >>$ppd_file_name
echo '*PageRegion BrLetter/Letter:			"<</PageSize[612 792]/ImagingBBox null>>setpagedevice"'                                    >>$ppd_file_name
echo '*PageRegion BrLegal/Legal:			"<</PageSize[612 1008]/ImagingBBox null>>setpagedevice"'                                     >>$ppd_file_name
echo '*PageRegion BrExecutive/Executive: 		"<</PageSize[522 756]/ImagingBBox null>>setpagedevice"'                              >>$ppd_file_name
echo '*PageRegion BrJISB5/JIS B5:			"<</PageSize[516 729]/ImagingBBox null>>setpagedevice"'                                     >>$ppd_file_name
echo '*PageRegion BrA5/A5:				"<</PageSize[420 595]/ImagingBBox null>>setpagedevice"'                                           >>$ppd_file_name
echo '*PageRegion BrA6/A6:				"<</PageSize[298 419]/ImagingBBox null>>setpagedevice"'                                           >>$ppd_file_name
echo '*PageRegion BrPostC4x6/Photo:			"<</PageSize[288 432]/ImagingBBox null>>setpagedevice"'                                   >>$ppd_file_name
echo '*PageRegion BrIndexC5x8/Index Card:		"<</PageSize[360 576]/ImagingBBox null>>setpagedevice"'                              >>$ppd_file_name
echo '*PageRegion BrPhotoL/Photo L: 			"<</PageSize[252 360]/ImagingBBox null>>setpagedevice"'                                  >>$ppd_file_name
echo '*PageRegion BrPhoto2L/Photo 2L: 		"<</PageSize[360 504]/ImagingBBox null>>setpagedevice"'                                 >>$ppd_file_name
echo '*PageRegion BrHagaki/PostCard 1: 		"<</PageSize[283 419]/ImagingBBox null>>setpagedevice"'                                >>$ppd_file_name
echo '*PageRegion BrDoubleHagaki/PostCard 2(Double): 	"<</PageSize[420 567]/ImagingBBox null>>setpagedevice"'                   >>$ppd_file_name
echo '*PageRegion BrC5/C5 Envelope: 			"<</PageSize[459 649]/ImagingBBox null>>setpagedevice"'                                  >>$ppd_file_name
echo '*PageRegion BrDL/DL Envelope: 			"<</PageSize[312 624]/ImagingBBox null>>setpagedevice"'                                  >>$ppd_file_name
echo '*PageRegion BrCom10/Com-10:			"<</PageSize[297 684]/ImagingBBox null>>setpagedevice"'                                     >>$ppd_file_name
echo '*PageRegion BrMonarch/Monarch:			"<</PageSize[279 540]/ImagingBBox null>>setpagedevice"'                                  >>$ppd_file_name
echo '*PageRegion BrYokei4/JE4 Envelope: 		"<</PageSize[297 664]/ImagingBBox null>>setpagedevice"'                              >>$ppd_file_name
echo '*CloseUI: *PageRegion'                                                            >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*DefaultImageableArea: BrLetter '                                                 >>$ppd_file_name
echo '*ImageableArea BrA4/A4:					"9 9 586 833"'                                        >>$ppd_file_name
echo '*ImageableArea BrLetter/Letter:				"18 9 594 783"'                                >>$ppd_file_name
echo '*ImageableArea BrLegal/Legal:				"18 9 594 999"'                                  >>$ppd_file_name
echo '*ImageableArea BrExecutive/Executive:			"9 9 513 747"'                            >>$ppd_file_name
echo '*ImageableArea BrJISB5/JIS B5:				"9 9 507 720"'                                  >>$ppd_file_name
echo '*ImageableArea BrA5/A5:					"9 9 411 586"'                                        >>$ppd_file_name
echo '*ImageableArea BrA6/A6:					"9 9 289 410"'                                        >>$ppd_file_name
echo '*ImageableArea BrPostC4x6/Photo:			"9 9 279 423"'                                 >>$ppd_file_name
echo '*ImageableArea BrIndexC5x8/Index Card:			"9 9 351 567"'                           >>$ppd_file_name
echo '*ImageableArea BrPhotoL/Photo L:			"9 9 243 351"'                                 >>$ppd_file_name
echo '*ImageableArea BrPhoto2L/Photo 2L:			"9 9 351 495"'                               >>$ppd_file_name
echo '*ImageableArea BrHagaki/PostCard 1: 			"9 9 274 410"'                             >>$ppd_file_name
echo '*ImageableArea BrDoubleHagaki/PostCard 2(Double): 	"9 9 411 558"'                 >>$ppd_file_name
echo '*ImageableArea BrC5/C5 Envelope: 			"9 57 450 621"'                               >>$ppd_file_name
echo '*ImageableArea BrDL/DL Envelope:			"9 57 303 596"'                                >>$ppd_file_name
echo '*ImageableArea BrCom10/Com-10:				"9 57 288 656"'                                 >>$ppd_file_name
echo '*ImageableArea BrMonarch/Monarch:			"9 57 270 512"'                               >>$ppd_file_name
echo '*%ImageableArea BrYokei4/JE4 Envelope: 			"9 28 288 636"'                         >>$ppd_file_name
echo '*ImageableArea BrYokei4/JE4 Envelope: 			"9 60 288 636"'                          >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*%==== Information About Media Sizes ========'                                    >>$ppd_file_name
echo '*DefaultPaperDimension: BrLetter'                                                 >>$ppd_file_name
echo '*PaperDimension BrA4/A4:				"595 842"'                                            >>$ppd_file_name
echo '*PaperDimension BrLetter/Letter:			"612 792"'                                     >>$ppd_file_name
echo '*PaperDimension BrLegal/Legal:				"612 1008"'                                     >>$ppd_file_name
echo '*PaperDimension BrExecutive/Executive:			"522 756"'                               >>$ppd_file_name
echo '*PaperDimension BrJISB5/JIS B5:				"516 729"'                                     >>$ppd_file_name
echo '*PaperDimension BrA5/A5:				"420 595"'                                            >>$ppd_file_name
echo '*PaperDimension BrA6/A6:				"298 419"'                                            >>$ppd_file_name
echo '*PaperDimension BrPostC4x6/Photo:			"288 432"'                                    >>$ppd_file_name
echo '*PaperDimension BrIndexC5x8/Index Card:			"360 576"'                              >>$ppd_file_name
echo '*PaperDimension BrPhotoL/Photo L:			"252 360"'                                    >>$ppd_file_name
echo '*PaperDimension BrPhoto2L/Photo 2L:			"360 504"'                                  >>$ppd_file_name
echo '*PaperDimension BrHagaki/PostCard 1: 			"283 419"'                                >>$ppd_file_name
echo '*PaperDimension BrDoubleHagaki/PostCard 2(Double): 	"420 567"'                    >>$ppd_file_name
echo '*PaperDimension BrC5/C5 Envelope: 			"459 649"'                                   >>$ppd_file_name
echo '*PaperDimension BrDL/DL Envelope:			"312 624"'                                    >>$ppd_file_name
echo '*PaperDimension BrCom10/Com-10:				"297 684"'                                     >>$ppd_file_name
echo '*PaperDimension BrMonarch/Monarch:			"279 540"'                                   >>$ppd_file_name
echo '*PaperDimension BrYokei4/JE4 Envelope: 			"297 664"'                              >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*%==== Custom Page Sizes ===================='                                    >>$ppd_file_name
echo '*NonUIOrderDependency: 40 AnySetup *CustomPageSize'                               >>$ppd_file_name
echo '*VariablePaperSize: True'                                                         >>$ppd_file_name
echo '*LeadingEdge Short: ""'                                                           >>$ppd_file_name
echo '*DefaultLeadingEdge: Short'                                                       >>$ppd_file_name
echo '*MaxMediaWidth: "612"'                                                            >>$ppd_file_name
echo '*MaxMediaHeight: "1008"'                                                          >>$ppd_file_name
echo '*HWMargins: 8.5 8.5 8.5 8.5'                                                      >>$ppd_file_name
echo '*CustomPageSize True: "'                                                          >>$ppd_file_name
echo '	<</BRCustomPageSize true>> setpagedevice'                                        >>$ppd_file_name
echo '	pop pop pop '                                                                    >>$ppd_file_name
echo '	<< /PageSize [ 5 -2 roll ] /ImagingBBox null >> '                                >>$ppd_file_name
echo '	setpagedevice '                                                                  >>$ppd_file_name
echo '"'                                                                                >>$ppd_file_name
echo '*End'                                                                             >>$ppd_file_name
echo '*ParamCustomPageSize Width: 1 points 252 612'                                     >>$ppd_file_name
echo '*ParamCustomPageSize Height: 2 points 360 1008'                                   >>$ppd_file_name
echo '*ParamCustomPageSize WidthOffset: 3 points 0 0'                                   >>$ppd_file_name
echo '*ParamCustomPageSize HeightOffset: 4 points 0 0'                                  >>$ppd_file_name
echo '*ParamCustomPageSize Orientation: 5 int 0 3'                                      >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*%=== Send Fax ================================'                                  >>$ppd_file_name
echo '*OpenUI *BROutput/Send Fax: PickOne'                                              >>$ppd_file_name
echo '*OrderDependency: 25 AnySetup *BROutput'                                          >>$ppd_file_name
echo '*DefaultBROutput: None'                                                           >>$ppd_file_name
echo '*BROutput None/Off: ""'                                                           >>$ppd_file_name
echo '*BROutput FAX/Send Fax: "<</HWResolution [200 200]/cupsColorOrder 0/cupsColorSpace 3/cupsBitsPerColor 8 >> setpagedevice"'  >>$ppd_file_name
echo '*CloseUI: *BROutput'                                                              >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*%==== Resolution Features ================================='                     >>$ppd_file_name
echo '*%%%%% Resolution and Appearance Control %%%%%'                                   >>$ppd_file_name
echo '*OpenUI *Resolution/Quality: PickOne'                                             >>$ppd_file_name
echo '*OrderDependency: 11 AnySetup *Resolution'                                        >>$ppd_file_name
echo '*DefaultResolution: Normal'                                                       >>$ppd_file_name
echo '*Resolution	Normal/Normal: "<</HWResolution [300 300]/cupsColorOrder 0/cupsColorSpace 1/cupsBitsPerColor 8>> setpagedevice"'         >>$ppd_file_name
echo '*Resolution	Fine/Fine: "<</HWResolution [600 600]/cupsColorOrder 0/cupsColorSpace 1/cupsBitsPerColor 8>> setpagedevice"'         >>$ppd_file_name
echo '*Resolution	S.Fine/Super Fine: "<</HWResolution [600 600]/cupsColorOrder 0/cupsColorSpace 1/cupsBitsPerColor 8>> setpagedevice"'         >>$ppd_file_name
echo '*Resolution	Photo/Photo: "<</HWResolution [600 600]/cupsColorOrder 0/cupsColorSpace 1/cupsBitsPerColor 8>> setpagedevice"'         >>$ppd_file_name
echo '*CloseUI: *Resolution'                                                            >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*%=== Paper Feed(BHM)================================'                            >>$ppd_file_name
echo '*%OpenUI *InputSlot: PickOne'                                                     >>$ppd_file_name
echo '*%OrderDependency: 29 AnySetup *InputSlot'                                        >>$ppd_file_name
echo '*%DefaultInputSlot: AutoSelect'                                                   >>$ppd_file_name
echo '*%InputSlot AutoSelect/Auto Select: "<</cupsMediaPosition 0>> setpagedevice"'     >>$ppd_file_name
echo '*%InputSlot Manual/Manual Feed: "<</cupsMediaPosition 1>>setpagedevice"'          >>$ppd_file_name
echo '*%CloseUI: *InputSlot'                                                            >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*%=== MonoOrColor ================================'                               >>$ppd_file_name
echo '*OpenUI *BRMonoColor/Color/Grayscale: PickOne'                                    >>$ppd_file_name
echo '*OrderDependency: 12 AnySetup *BRMonoColor'                                       >>$ppd_file_name
echo '*DefaultBRMonoColor: Color'                                                       >>$ppd_file_name
echo '*BRMonoColor Color/Color: ""'                                                     >>$ppd_file_name
echo '*BRMonoColor Mono/Grayscale: ""'                                                  >>$ppd_file_name
echo '*CloseUI: *BRMonoColor'                                                           >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*%=== MonoOrColor ================================'                               >>$ppd_file_name
echo '*OpenUI *BRColorMediaType/Media Type: PickOne'                                    >>$ppd_file_name
echo '*OrderDependency: 13 AnySetup *BRColorMediaType'                                  >>$ppd_file_name
echo '*DefaultBRColorMediaType: Plain'                                                  >>$ppd_file_name
echo '*BRColorMediaType Plain/Plain Paper: "<</cupsMediaType 0>> setpagedevice"'        >>$ppd_file_name
echo '*BRColorMediaType Inkjet/Inkjet Paper: "<</cupsMediaType 1>> setpagedevice"'      >>$ppd_file_name
echo '*BRColorMediaType Glossy4/Glossy(4 color): "<</cupsMediaType 2>> setpagedevice"'  >>$ppd_file_name
echo '*BRColorMediaType Glossy3/Glossy(3 Color): "<</cupsMediaType 3>> setpagedevice"'  >>$ppd_file_name
echo '*BRColorMediaType Transparencies/Transparencies: "<</cupsMediaType 4>> setpagedevice"'                >>$ppd_file_name
echo '*BRColorMediaType Transparencies(Mirror)/Transparencies(Mirror): "<</cupsMediaType 5>> setpagedevice"'                    >>$ppd_file_name
echo '*CloseUI: *BRColorMediaType'                                                      >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*%=== Paper Thick ================================'                               >>$ppd_file_name
echo '*OpenUI *BRColorPaperThick/Paper Thickness: PickOne'                              >>$ppd_file_name
echo '*OrderDependency: 14 AnySetup *BRColorPaperThick'                                 >>$ppd_file_name
echo '*DefaultBRColorPaperThick: Regular'                                               >>$ppd_file_name
echo '*BRColorPaperThick Regular/Regular: ""'                                           >>$ppd_file_name
echo '*BRColorPaperThick Thick/Thick: ""'                                               >>$ppd_file_name
echo '*CloseUI: *BRColorPaperThick'                                                     >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*%=== Bi-DirKey ================================'                                 >>$ppd_file_name
echo '*OpenUI *BRBiDir/Bi-Directional Printing: PickOne'                                >>$ppd_file_name
echo '*OrderDependency: 15 AnySetup *BRColorPaperThick'                                 >>$ppd_file_name
echo '*DefaultBRBiDir: ON'                                                              >>$ppd_file_name
echo '*BRBiDir OFF/OFF: ""'                                                             >>$ppd_file_name
echo '*BRBiDir ON/ON: ""'                                                               >>$ppd_file_name
echo '*CloseUI: *BRBiDir'                                                               >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*%=== Document ================================'                                  >>$ppd_file_name
echo '*OpenUI *BRDocument/Document: PickOne'                                            >>$ppd_file_name
echo '*OrderDependency: 16 AnySetup *BRDocument'                                        >>$ppd_file_name
echo '*DefaultBRDocument: Photo'                                                        >>$ppd_file_name
echo '*BRDocument Photo/Photo: ""'                                                      >>$ppd_file_name
echo '*BRDocument Graphics/Graphics: ""'                                                >>$ppd_file_name
echo '*BRDocument Custom/Custom: ""'                                                    >>$ppd_file_name
echo '*CloseUI: *BRDocument'                                                            >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*%=== Color Matching ================================'                            >>$ppd_file_name
echo '*OpenUI *BRColorMatching/Color Matching: PickOne'                                 >>$ppd_file_name
echo '*OrderDependency: 17 AnySetup *BRColorMatching'                                   >>$ppd_file_name
echo '*DefaultBRColorMatching: Natural'                                                 >>$ppd_file_name
echo '*BRColorMatching Natural/Natural: ""'                                             >>$ppd_file_name
echo '*BRColorMatching Vivid/Vivid: ""'                                                 >>$ppd_file_name
echo '*BRColorMatching None/None: ""'                                                   >>$ppd_file_name
echo '*CloseUI: *BRColorMatching'                                                       >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*%=== Half Tone Pattern ================================'                         >>$ppd_file_name
echo '*OpenUI *BRHalfTonePattern/Half Tone Pattern: PickOne'                            >>$ppd_file_name
echo '*OrderDependency: 18 AnySetup *BRHalfTonePattern'                                 >>$ppd_file_name
echo '*DefaultBRHalfTonePattern: Diffusion'                                             >>$ppd_file_name
echo '*BRHalfTonePattern Diffusion/Diffusion: ""'                                       >>$ppd_file_name
echo '*BRHalfTonePattern Dither/Dither: ""'                                             >>$ppd_file_name
echo '*CloseUI: *BRHalfTonePattern'                                                     >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*%=== True2Life ================================'                                 >>$ppd_file_name
echo '*OpenUI *BRColorEnhancement/Color Enhancement(True2Life): PickOne'                >>$ppd_file_name
echo '*OrderDependency: 19 AnySetup *BRColorEnhancement'                                >>$ppd_file_name
echo '*DefaultBRColorEnhancement: OFF'                                                  >>$ppd_file_name
echo '*BRColorEnhancement OFF/OFF: ""'                                                  >>$ppd_file_name
echo '*BRColorEnhancement ON/ON: ""'                                                    >>$ppd_file_name
echo '*CloseUI: *BRColorEnhancement'                                                    >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*%=== Brightness ================================'                                >>$ppd_file_name
echo '*OpenUI *BRBrightness/Brightness: PickOne'                                        >>$ppd_file_name
echo '*OrderDependency: 20 AnySetup *BRBrightness'                                      >>$ppd_file_name
echo '*DefaultBRBrightness: 0'                                                          >>$ppd_file_name
echo '*BRBrightness -20/-20: ""'                                                        >>$ppd_file_name
echo '*BRBrightness -19/-19: ""'                                                        >>$ppd_file_name
echo '*BRBrightness -18/-18: ""'                                                        >>$ppd_file_name
echo '*BRBrightness -17/-17: ""'                                                        >>$ppd_file_name
echo '*BRBrightness -16/-16: ""'                                                        >>$ppd_file_name
echo '*BRBrightness -15/-15: ""'                                                        >>$ppd_file_name
echo '*BRBrightness -14/-14: ""'                                                        >>$ppd_file_name
echo '*BRBrightness -13/-13: ""'                                                        >>$ppd_file_name
echo '*BRBrightness -12/-12: ""'                                                        >>$ppd_file_name
echo '*BRBrightness -11/-11: ""'                                                        >>$ppd_file_name
echo '*BRBrightness -10/-10: ""'                                                        >>$ppd_file_name
echo '*BRBrightness -9/-9: ""'                                                          >>$ppd_file_name
echo '*BRBrightness -8/-8: ""'                                                          >>$ppd_file_name
echo '*BRBrightness -7/-7: ""'                                                          >>$ppd_file_name
echo '*BRBrightness -6/-6: ""'                                                          >>$ppd_file_name
echo '*BRBrightness -5/-5: ""'                                                          >>$ppd_file_name
echo '*BRBrightness -4/-4: ""'                                                          >>$ppd_file_name
echo '*BRBrightness -3/-3: ""'                                                          >>$ppd_file_name
echo '*BRBrightness -2/-2: ""'                                                          >>$ppd_file_name
echo '*BRBrightness -1/-1: ""'                                                          >>$ppd_file_name
echo '*BRBrightness 0/0: ""'                                                            >>$ppd_file_name
echo '*BRBrightness 1/1: ""'                                                            >>$ppd_file_name
echo '*BRBrightness 2/2: ""'                                                            >>$ppd_file_name
echo '*BRBrightness 3/3: ""'                                                            >>$ppd_file_name
echo '*BRBrightness 4/4: ""'                                                            >>$ppd_file_name
echo '*BRBrightness 5/5: ""'                                                            >>$ppd_file_name
echo '*BRBrightness 6/6: ""'                                                            >>$ppd_file_name
echo '*BRBrightness 7/7: ""'                                                            >>$ppd_file_name
echo '*BRBrightness 8/8: ""'                                                            >>$ppd_file_name
echo '*BRBrightness 9/9: ""'                                                            >>$ppd_file_name
echo '*BRBrightness 10/10: ""'                                                          >>$ppd_file_name
echo '*BRBrightness 11/11: ""'                                                          >>$ppd_file_name
echo '*BRBrightness 12/12: ""'                                                          >>$ppd_file_name
echo '*BRBrightness 13/13: ""'                                                          >>$ppd_file_name
echo '*BRBrightness 14/14: ""'                                                          >>$ppd_file_name
echo '*BRBrightness 15/15: ""'                                                          >>$ppd_file_name
echo '*BRBrightness 16/16: ""'                                                          >>$ppd_file_name
echo '*BRBrightness 17/17: ""'                                                          >>$ppd_file_name
echo '*BRBrightness 18/18: ""'                                                          >>$ppd_file_name
echo '*BRBrightness 19/19: ""'                                                          >>$ppd_file_name
echo '*BRBrightness 20/20: ""'                                                          >>$ppd_file_name
echo '*CloseUI: *BRBrightness'                                                          >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*%=== Contrast ================================'                                  >>$ppd_file_name
echo '*OpenUI *BRContrast/Contrast: PickOne'                                            >>$ppd_file_name
echo '*OrderDependency: 21 AnySetup *BRContrast'                                        >>$ppd_file_name
echo '*DefaultBRContrast: 0'                                                            >>$ppd_file_name
echo '*BRContrast -20/-20: ""'                                                          >>$ppd_file_name
echo '*BRContrast -19/-19: ""'                                                          >>$ppd_file_name
echo '*BRContrast -18/-18: ""'                                                          >>$ppd_file_name
echo '*BRContrast -17/-17: ""'                                                          >>$ppd_file_name
echo '*BRContrast -16/-16: ""'                                                          >>$ppd_file_name
echo '*BRContrast -15/-15: ""'                                                          >>$ppd_file_name
echo '*BRContrast -14/-14: ""'                                                          >>$ppd_file_name
echo '*BRContrast -13/-13: ""'                                                          >>$ppd_file_name
echo '*BRContrast -12/-12: ""'                                                          >>$ppd_file_name
echo '*BRContrast -11/-11: ""'                                                          >>$ppd_file_name
echo '*BRContrast -10/-10: ""'                                                          >>$ppd_file_name
echo '*BRContrast -9/-9: ""'                                                            >>$ppd_file_name
echo '*BRContrast -8/-8: ""'                                                            >>$ppd_file_name
echo '*BRContrast -7/-7: ""'                                                            >>$ppd_file_name
echo '*BRContrast -6/-6: ""'                                                            >>$ppd_file_name
echo '*BRContrast -5/-5: ""'                                                            >>$ppd_file_name
echo '*BRContrast -4/-4: ""'                                                            >>$ppd_file_name
echo '*BRContrast -3/-3: ""'                                                            >>$ppd_file_name
echo '*BRContrast -2/-2: ""'                                                            >>$ppd_file_name
echo '*BRContrast -1/-1: ""'                                                            >>$ppd_file_name
echo '*BRContrast 0/0: ""'                                                              >>$ppd_file_name
echo '*BRContrast 1/1: ""'                                                              >>$ppd_file_name
echo '*BRContrast 2/2: ""'                                                              >>$ppd_file_name
echo '*BRContrast 3/3: ""'                                                              >>$ppd_file_name
echo '*BRContrast 4/4: ""'                                                              >>$ppd_file_name
echo '*BRContrast 5/5: ""'                                                              >>$ppd_file_name
echo '*BRContrast 6/6: ""'                                                              >>$ppd_file_name
echo '*BRContrast 7/7: ""'                                                              >>$ppd_file_name
echo '*BRContrast 8/8: ""'                                                              >>$ppd_file_name
echo '*BRContrast 9/9: ""'                                                              >>$ppd_file_name
echo '*BRContrast 10/10: ""'                                                            >>$ppd_file_name
echo '*BRContrast 11/11: ""'                                                            >>$ppd_file_name
echo '*BRContrast 12/12: ""'                                                            >>$ppd_file_name
echo '*BRContrast 13/13: ""'                                                            >>$ppd_file_name
echo '*BRContrast 14/14: ""'                                                            >>$ppd_file_name
echo '*BRContrast 15/15: ""'                                                            >>$ppd_file_name
echo '*BRContrast 16/16: ""'                                                            >>$ppd_file_name
echo '*BRContrast 17/17: ""'                                                            >>$ppd_file_name
echo '*BRContrast 18/18: ""'                                                            >>$ppd_file_name
echo '*BRContrast 19/19: ""'                                                            >>$ppd_file_name
echo '*BRContrast 20/20: ""'                                                            >>$ppd_file_name
echo '*CloseUI: *BRContrast'                                                            >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*%=== Red ================================'                                       >>$ppd_file_name
echo '*OpenUI *BRRed/Red: PickOne'                                                      >>$ppd_file_name
echo '*OrderDependency: 22 AnySetup *BRRed'                                             >>$ppd_file_name
echo '*DefaultBRRed: 0'                                                                 >>$ppd_file_name
echo '*BRRed -20/-20: ""'                                                               >>$ppd_file_name
echo '*BRRed -19/-19: ""'                                                               >>$ppd_file_name
echo '*BRRed -18/-18: ""'                                                               >>$ppd_file_name
echo '*BRRed -17/-17: ""'                                                               >>$ppd_file_name
echo '*BRRed -16/-16: ""'                                                               >>$ppd_file_name
echo '*BRRed -15/-15: ""'                                                               >>$ppd_file_name
echo '*BRRed -14/-14: ""'                                                               >>$ppd_file_name
echo '*BRRed -13/-13: ""'                                                               >>$ppd_file_name
echo '*BRRed -12/-12: ""'                                                               >>$ppd_file_name
echo '*BRRed -11/-11: ""'                                                               >>$ppd_file_name
echo '*BRRed -10/-10: ""'                                                               >>$ppd_file_name
echo '*BRRed -9/-9: ""'                                                                 >>$ppd_file_name
echo '*BRRed -8/-8: ""'                                                                 >>$ppd_file_name
echo '*BRRed -7/-7: ""'                                                                 >>$ppd_file_name
echo '*BRRed -6/-6: ""'                                                                 >>$ppd_file_name
echo '*BRRed -5/-5: ""'                                                                 >>$ppd_file_name
echo '*BRRed -4/-4: ""'                                                                 >>$ppd_file_name
echo '*BRRed -3/-3: ""'                                                                 >>$ppd_file_name
echo '*BRRed -2/-2: ""'                                                                 >>$ppd_file_name
echo '*BRRed -1/-1: ""'                                                                 >>$ppd_file_name
echo '*BRRed 0/0: ""'                                                                   >>$ppd_file_name
echo '*BRRed 1/1: ""'                                                                   >>$ppd_file_name
echo '*BRRed 2/2: ""'                                                                   >>$ppd_file_name
echo '*BRRed 3/3: ""'                                                                   >>$ppd_file_name
echo '*BRRed 4/4: ""'                                                                   >>$ppd_file_name
echo '*BRRed 5/5: ""'                                                                   >>$ppd_file_name
echo '*BRRed 6/6: ""'                                                                   >>$ppd_file_name
echo '*BRRed 7/7: ""'                                                                   >>$ppd_file_name
echo '*BRRed 8/8: ""'                                                                   >>$ppd_file_name
echo '*BRRed 9/9: ""'                                                                   >>$ppd_file_name
echo '*BRRed 10/10: ""'                                                                 >>$ppd_file_name
echo '*BRRed 11/11: ""'                                                                 >>$ppd_file_name
echo '*BRRed 12/12: ""'                                                                 >>$ppd_file_name
echo '*BRRed 13/13: ""'                                                                 >>$ppd_file_name
echo '*BRRed 14/14: ""'                                                                 >>$ppd_file_name
echo '*BRRed 15/15: ""'                                                                 >>$ppd_file_name
echo '*BRRed 16/16: ""'                                                                 >>$ppd_file_name
echo '*BRRed 17/17: ""'                                                                 >>$ppd_file_name
echo '*BRRed 18/18: ""'                                                                 >>$ppd_file_name
echo '*BRRed 19/19: ""'                                                                 >>$ppd_file_name
echo '*BRRed 20/20: ""'                                                                 >>$ppd_file_name
echo '*CloseUI: *BRRed'                                                                 >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*%=== Green ================================'                                     >>$ppd_file_name
echo '*OpenUI *BRGreen/Green: PickOne'                                                  >>$ppd_file_name
echo '*OrderDependency: 23 AnySetup *BRGreen'                                           >>$ppd_file_name
echo '*DefaultBRGreen: 0'                                                               >>$ppd_file_name
echo '*BRGreen -20/-20: ""'                                                             >>$ppd_file_name
echo '*BRGreen -19/-19: ""'                                                             >>$ppd_file_name
echo '*BRGreen -18/-18: ""'                                                             >>$ppd_file_name
echo '*BRGreen -17/-17: ""'                                                             >>$ppd_file_name
echo '*BRGreen -16/-16: ""'                                                             >>$ppd_file_name
echo '*BRGreen -15/-15: ""'                                                             >>$ppd_file_name
echo '*BRGreen -14/-14: ""'                                                             >>$ppd_file_name
echo '*BRGreen -13/-13: ""'                                                             >>$ppd_file_name
echo '*BRGreen -12/-12: ""'                                                             >>$ppd_file_name
echo '*BRGreen -11/-11: ""'                                                             >>$ppd_file_name
echo '*BRGreen -10/-10: ""'                                                             >>$ppd_file_name
echo '*BRGreen -9/-9: ""'                                                               >>$ppd_file_name
echo '*BRGreen -8/-8: ""'                                                               >>$ppd_file_name
echo '*BRGreen -7/-7: ""'                                                               >>$ppd_file_name
echo '*BRGreen -6/-6: ""'                                                               >>$ppd_file_name
echo '*BRGreen -5/-5: ""'                                                               >>$ppd_file_name
echo '*BRGreen -4/-4: ""'                                                               >>$ppd_file_name
echo '*BRGreen -3/-3: ""'                                                               >>$ppd_file_name
echo '*BRGreen -2/-2: ""'                                                               >>$ppd_file_name
echo '*BRGreen -1/-1: ""'                                                               >>$ppd_file_name
echo '*BRGreen 0/0: ""'                                                                 >>$ppd_file_name
echo '*BRGreen 1/1: ""'                                                                 >>$ppd_file_name
echo '*BRGreen 2/2: ""'                                                                 >>$ppd_file_name
echo '*BRGreen 3/3: ""'                                                                 >>$ppd_file_name
echo '*BRGreen 4/4: ""'                                                                 >>$ppd_file_name
echo '*BRGreen 5/5: ""'                                                                 >>$ppd_file_name
echo '*BRGreen 6/6: ""'                                                                 >>$ppd_file_name
echo '*BRGreen 7/7: ""'                                                                 >>$ppd_file_name
echo '*BRGreen 8/8: ""'                                                                 >>$ppd_file_name
echo '*BRGreen 9/9: ""'                                                                 >>$ppd_file_name
echo '*BRGreen 10/10: ""'                                                               >>$ppd_file_name
echo '*BRGreen 11/11: ""'                                                               >>$ppd_file_name
echo '*BRGreen 12/12: ""'                                                               >>$ppd_file_name
echo '*BRGreen 13/13: ""'                                                               >>$ppd_file_name
echo '*BRGreen 14/14: ""'                                                               >>$ppd_file_name
echo '*BRGreen 15/15: ""'                                                               >>$ppd_file_name
echo '*BRGreen 16/16: ""'                                                               >>$ppd_file_name
echo '*BRGreen 17/17: ""'                                                               >>$ppd_file_name
echo '*BRGreen 18/18: ""'                                                               >>$ppd_file_name
echo '*BRGreen 19/19: ""'                                                               >>$ppd_file_name
echo '*BRGreen 20/20: ""'                                                               >>$ppd_file_name
echo '*CloseUI: *BRGreen'                                                               >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*%=== Blue ================================'                                      >>$ppd_file_name
echo '*OpenUI *BRBlue/Blue: PickOne'                                                    >>$ppd_file_name
echo '*OrderDependency: 24 AnySetup *BRBlue'                                            >>$ppd_file_name
echo '*DefaultBRBlue: 0'                                                                >>$ppd_file_name
echo '*BRBlue -20/-20: ""'                                                              >>$ppd_file_name
echo '*BRBlue -19/-19: ""'                                                              >>$ppd_file_name
echo '*BRBlue -18/-18: ""'                                                              >>$ppd_file_name
echo '*BRBlue -17/-17: ""'                                                              >>$ppd_file_name
echo '*BRBlue -16/-16: ""'                                                              >>$ppd_file_name
echo '*BRBlue -15/-15: ""'                                                              >>$ppd_file_name
echo '*BRBlue -14/-14: ""'                                                              >>$ppd_file_name
echo '*BRBlue -13/-13: ""'                                                              >>$ppd_file_name
echo '*BRBlue -12/-12: ""'                                                              >>$ppd_file_name
echo '*BRBlue -11/-11: ""'                                                              >>$ppd_file_name
echo '*BRBlue -10/-10: ""'                                                              >>$ppd_file_name
echo '*BRBlue -9/-9: ""'                                                                >>$ppd_file_name
echo '*BRBlue -8/-8: ""'                                                                >>$ppd_file_name
echo '*BRBlue -7/-7: ""'                                                                >>$ppd_file_name
echo '*BRBlue -6/-6: ""'                                                                >>$ppd_file_name
echo '*BRBlue -5/-5: ""'                                                                >>$ppd_file_name
echo '*BRBlue -4/-4: ""'                                                                >>$ppd_file_name
echo '*BRBlue -3/-3: ""'                                                                >>$ppd_file_name
echo '*BRBlue -2/-2: ""'                                                                >>$ppd_file_name
echo '*BRBlue -1/-1: ""'                                                                >>$ppd_file_name
echo '*BRBlue 0/0: ""'                                                                  >>$ppd_file_name
echo '*BRBlue 1/1: ""'                                                                  >>$ppd_file_name
echo '*BRBlue 2/2: ""'                                                                  >>$ppd_file_name
echo '*BRBlue 3/3: ""'                                                                  >>$ppd_file_name
echo '*BRBlue 4/4: ""'                                                                  >>$ppd_file_name
echo '*BRBlue 5/5: ""'                                                                  >>$ppd_file_name
echo '*BRBlue 6/6: ""'                                                                  >>$ppd_file_name
echo '*BRBlue 7/7: ""'                                                                  >>$ppd_file_name
echo '*BRBlue 8/8: ""'                                                                  >>$ppd_file_name
echo '*BRBlue 9/9: ""'                                                                  >>$ppd_file_name
echo '*BRBlue 10/10: ""'                                                                >>$ppd_file_name
echo '*BRBlue 11/11: ""'                                                                >>$ppd_file_name
echo '*BRBlue 12/12: ""'                                                                >>$ppd_file_name
echo '*BRBlue 13/13: ""'                                                                >>$ppd_file_name
echo '*BRBlue 14/14: ""'                                                                >>$ppd_file_name
echo '*BRBlue 15/15: ""'                                                                >>$ppd_file_name
echo '*BRBlue 16/16: ""'                                                                >>$ppd_file_name
echo '*BRBlue 17/17: ""'                                                                >>$ppd_file_name
echo '*BRBlue 18/18: ""'                                                                >>$ppd_file_name
echo '*BRBlue 19/19: ""'                                                                >>$ppd_file_name
echo '*BRBlue 20/20: ""'                                                                >>$ppd_file_name
echo '*CloseUI: *BRBlue'                                                                >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo '*DefaultFont: Courier'                                                            >>$ppd_file_name
echo '*Font AvantGarde-Book: Standard "(001.006S)" Standard ROM'                        >>$ppd_file_name
echo '*Font AvantGarde-BookOblique: Standard "(001.006S)" Standard ROM'                 >>$ppd_file_name
echo '*Font AvantGarde-Demi: Standard "(001.007S)" Standard ROM'                        >>$ppd_file_name
echo '*Font AvantGarde-DemiOblique: Standard "(001.007S)" Standard ROM'                 >>$ppd_file_name
echo '*Font Bookman-Demi: Standard "(001.004S)" Standard ROM'                           >>$ppd_file_name
echo '*Font Bookman-DemiItalic: Standard "(001.004S)" Standard ROM'                     >>$ppd_file_name
echo '*Font Bookman-Light: Standard "(001.004S)" Standard ROM'                          >>$ppd_file_name
echo '*Font Bookman-LightItalic: Standard "(001.004S)" Standard ROM'                    >>$ppd_file_name
echo '*Font Courier: Standard "(002.004S)" Standard ROM'                                >>$ppd_file_name
echo '*Font Courier-Bold: Standard "(002.004S)" Standard ROM'                           >>$ppd_file_name
echo '*Font Courier-BoldOblique: Standard "(002.004S)" Standard ROM'                    >>$ppd_file_name
echo '*Font Courier-Oblique: Standard "(002.004S)" Standard ROM'                        >>$ppd_file_name
echo '*Font Helvetica: Standard "(001.006S)" Standard ROM'                              >>$ppd_file_name
echo '*Font Helvetica-Bold: Standard "(001.007S)" Standard ROM'                         >>$ppd_file_name
echo '*Font Helvetica-BoldOblique: Standard "(001.007S)" Standard ROM'                  >>$ppd_file_name
echo '*Font Helvetica-Narrow: Standard "(001.006S)" Standard ROM'                       >>$ppd_file_name
echo '*Font Helvetica-Narrow-Bold: Standard "(001.007S)" Standard ROM'                  >>$ppd_file_name
echo '*Font Helvetica-Narrow-BoldOblique: Standard "(001.007S)" Standard ROM'           >>$ppd_file_name
echo '*Font Helvetica-Narrow-Oblique: Standard "(001.006S)" Standard ROM'               >>$ppd_file_name
echo '*Font Helvetica-Oblique: Standard "(001.006S)" Standard ROM'                      >>$ppd_file_name
echo '*Font NewCenturySchlbk-Bold: Standard "(001.009S)" Standard ROM'                  >>$ppd_file_name
echo '*Font NewCenturySchlbk-BoldItalic: Standard "(001.007S)" Standard ROM'            >>$ppd_file_name
echo '*Font NewCenturySchlbk-Italic: Standard "(001.006S)" Standard ROM'                >>$ppd_file_name
echo '*Font NewCenturySchlbk-Roman: Standard "(001.007S)" Standard ROM'                 >>$ppd_file_name
echo '*Font Palatino-Bold: Standard "(001.005S)" Standard ROM'                          >>$ppd_file_name
echo '*Font Palatino-BoldItalic: Standard "(001.005S)" Standard ROM'                    >>$ppd_file_name
echo '*Font Palatino-Italic: Standard "(001.005S)" Standard ROM'                        >>$ppd_file_name
echo '*Font Palatino-Roman: Standard "(001.005S)" Standard ROM'                         >>$ppd_file_name
echo '*Font Times-Bold: Standard "(001.007S)" Standard ROM'                             >>$ppd_file_name
echo '*Font Times-BoldItalic: Standard "(001.009S)" Standard ROM'                       >>$ppd_file_name
echo '*Font Times-Italic: Standard "(001.007S)" Standard ROM'                           >>$ppd_file_name
echo '*Font Times-Roman: Standard "(001.007S)" Standard ROM'                            >>$ppd_file_name
echo '*Font ZapfChancery-MediumItalic: Standard "(001.007S)" Standard ROM'              >>$ppd_file_name
echo '*Font ZapfDingbats: Special "(001.004S)" Special ROM'                             >>$ppd_file_name
echo '*Font Symbol: Special "(001.007S)" Special ROM'                                   >>$ppd_file_name
echo '*Font Alaska: Standard "(001.005)" Standard ROM'                                  >>$ppd_file_name
echo '*Font AlaskaExtrabold: Standard "(001.005)" Standard ROM'                         >>$ppd_file_name
echo '*Font AntiqueOakland: Standard "(001.005)" Standard ROM'                          >>$ppd_file_name
echo '*Font AntiqueOakland-Bold: Standard "(001.005)" Standard ROM'                     >>$ppd_file_name
echo '*Font AntiqueOakland-Oblique: Standard "(001.005)" Standard ROM'                  >>$ppd_file_name
echo '*Font ClevelandCondensed: Standard "(001.005)" Standard ROM'                      >>$ppd_file_name
echo '*Font Connecticut: Standard "(001.005)" Standard ROM'                             >>$ppd_file_name
echo '*Font Guatemala-Antique: Standard "(001.005)" Standard ROM'                       >>$ppd_file_name
echo '*Font Guatemala-Bold: Standard "(001.005)" Standard ROM'                          >>$ppd_file_name
echo '*Font Guatemala-Italic: Standard "(001.005)" Standard ROM'                        >>$ppd_file_name
echo '*Font Guatemala-BoldItalic: Standard "(001.005)" Standard ROM'                    >>$ppd_file_name
echo '*Font LetterGothic: Standard "(001.005)" Standard ROM'                            >>$ppd_file_name
echo '*Font LetterGothic-Bold: Standard "(001.005)" Standard ROM'                       >>$ppd_file_name
echo '*Font LetterGothic-Oblique: Standard "(001.005)" Standard ROM'                    >>$ppd_file_name
echo '*Font Maryland: Standard "(001.005)" Standard ROM'                                >>$ppd_file_name
echo '*Font Oklahoma: Standard "(001.005)" Standard ROM'                                >>$ppd_file_name
echo '*Font Oklahoma-Bold: Standard "(001.005)" Standard ROM'                           >>$ppd_file_name
echo '*Font Oklahoma-Oblique: Standard "(001.005)" Standard ROM'                        >>$ppd_file_name
echo '*Font Oklahoma-BoldOblique: Standard "(001.005)" Standard ROM'                    >>$ppd_file_name
echo '*Font Utah: Standard "(001.005)" Standard ROM'                                    >>$ppd_file_name
echo '*Font Utah-Bold: Standard "(001.005)" Standard ROM'                               >>$ppd_file_name
echo '*Font Utah-Oblique: Standard "(001.005)" Standard ROM'                            >>$ppd_file_name
echo '*Font Utah-BoldOblique: Standard "(001.005)" Standard ROM'                        >>$ppd_file_name
echo '*Font UtahCondensed: Standard "(001.005)" Standard ROM'                           >>$ppd_file_name
echo '*Font UtahCondensed-Bold: Standard "(001.005)" Standard ROM'                      >>$ppd_file_name
echo '*Font UtahCondensed-Oblique: Standard "(001.004)" Standard ROM'                   >>$ppd_file_name
echo '*Font UtahCondensed-BoldOblique: Standard "(001.005)" Standard ROM'               >>$ppd_file_name
echo '*Font BermudaScript: Standard "(001.005)" Standard ROM'                           >>$ppd_file_name
echo '*Font Germany: Standard "(001.005)" Standard ROM'                                 >>$ppd_file_name
echo '*Font SanDiego: Standard "(001.005)" Standard ROM'                                >>$ppd_file_name
echo '*Font US-Roman: Standard "(001.005)" Standard ROM'                                >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
echo ''                                                                                 >>$ppd_file_name
set  brotherlpdwrapper=/usr/lib/cups/filter/brlpdwrapperMFC3820CN
rm -f  $brotherlpdwrapper
echo 'rm -f /usr/lib/cups/filter/brlpdwrapperMFC3820CN'
echo  '#! /bin/csh'  >>  $brotherlpdwrapper
echo  '#'  >>  $brotherlpdwrapper
echo  '# Brother Print filter  >>  $brotherlpdwrapper'  >>  $brotherlpdwrapper
echo  '# Copyright (C) 2004 Brother. Industries, Ltd.'  >>  $brotherlpdwrapper
echo  '#                                         Ver0.80'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  '# This program is free software; you can redistribute it and/or modify it'  >>  $brotherlpdwrapper
echo  '# under the terms of the GNU General Public License as published by the Free'  >>  $brotherlpdwrapper
echo  '# Software Foundation; either version 2 of the License, or (at your option)'  >>  $brotherlpdwrapper
echo  '# any later version.'  >>  $brotherlpdwrapper
echo  '#'  >>  $brotherlpdwrapper
echo  '# This program is distributed in the hope that it will be useful, but WITHOUT'  >>  $brotherlpdwrapper
echo  '# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or'  >>  $brotherlpdwrapper
echo  '# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for'  >>  $brotherlpdwrapper
echo  '# more details.'  >>  $brotherlpdwrapper
echo  '#'  >>  $brotherlpdwrapper
echo  '# You should have received a copy of the GNU General Public License along with'  >>  $brotherlpdwrapper
echo  '# this program; if not, write to the Free Software Foundation, Inc., 59 Temple'  >>  $brotherlpdwrapper
echo  '# Place, Suite 330, Boston, MA  02111-1307  USA'  >>  $brotherlpdwrapper
echo  '#'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  'set  LOGFILE=/dev/null'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  'set brcommands = ( \'  >>  $brotherlpdwrapper
echo  '    Media=PlainPaper		-md=PLAIN   \'  >>  $brotherlpdwrapper
echo  '    Media=InkjetPaper		-md=INKJET   \'  >>  $brotherlpdwrapper
echo  '    Media=Glossy4		-md=GLOSSY4   \'  >>  $brotherlpdwrapper
echo  '    Media=Glossy3		-md=GLOSSY3   \'  >>  $brotherlpdwrapper
echo  '    Media=Transpare		-md=TRANS   \'  >>  $brotherlpdwrapper
echo  '    Media=TranspareMirror	-md=TRANSMIR   \'  >>  $brotherlpdwrapper
echo  '    Resolution=300		-reso=300   \'  >>  $brotherlpdwrapper
echo  '    Resolution=600		-reso=600   \'  >>  $brotherlpdwrapper
echo  '    Resolution=1200x600		-reso=1200x600   \'  >>  $brotherlpdwrapper
echo  '    Resolution=1200		-reso=1200   \'  >>  $brotherlpdwrapper
echo  '    Bi-DirPrinting=OFF		-bidir   \'  >>  $brotherlpdwrapper
echo  '    Bi-DirPrinting=ON	        -bidir   \'  >>  $brotherlpdwrapper
echo  '    PaperType=A4		-pt=A4   \'  >>  $brotherlpdwrapper
echo  '    PaperType=Letter		-pt=LT   \'  >>  $brotherlpdwrapper
echo  '    PaperType=Legal		-pt=LGL   \'  >>  $brotherlpdwrapper
echo  '    PaperType=Exective		-pt=EXE   \'  >>  $brotherlpdwrapper
echo  '    PaperType=B5		-pt=B5   \'  >>  $brotherlpdwrapper
echo  '    PaperType=A5		-pt=A5   \'  >>  $brotherlpdwrapper
echo  '    PaperType=A6		-pt=A6   \'  >>  $brotherlpdwrapper
echo  '    PaperType=PostCard		-pt=POSTC   \'  >>  $brotherlpdwrapper
echo  '    PaperType=IndexCard		-pt=INDEXC   \'  >>  $brotherlpdwrapper
echo  '    PaperType=PhotoL		-pt=PHOTOL   \'  >>  $brotherlpdwrapper
echo  '    PaperType=Photo2L		-pt=PHOTO2L   \'  >>  $brotherlpdwrapper
echo  '    PaperType=Hagaki		-pt=HAGAKI   \'  >>  $brotherlpdwrapper
echo  '    PaperType=DblHagaki		-pt=DBLHAGAKI   \'  >>  $brotherlpdwrapper
echo  '    PaperType=C5		-pt=C5   \'  >>  $brotherlpdwrapper
echo  '    PaperType=DL		-pt=DL   \'  >>  $brotherlpdwrapper
echo  '    PaperType=Com-10		-pt=COM-10   \'  >>  $brotherlpdwrapper
echo  '    PaperType=Monarch		-pt=MONARCH   \'  >>  $brotherlpdwrapper
echo  '    PaperType=Youkei4		-pt=YOUKEI4   \'  >>  $brotherlpdwrapper
echo  '    PaperThickness=Regular	-thick=REGULAR   \'  >>  $brotherlpdwrapper
echo  '    PaperThickness=Thick	-thick=THICK   \'  >>  $brotherlpdwrapper
echo  '    PaperSource=MANUAL		-ps=Manual   \'  >>  $brotherlpdwrapper
echo  '    PaperSource=AUTO		-ps=AutoSelect   \'  >>  $brotherlpdwrapper
echo  '    ColorOrMono=Mono		-corm=MONO   \'  >>  $brotherlpdwrapper
echo  '    ColorOrMono=Color		-corm=COLOR   \'  >>  $brotherlpdwrapper
echo  '    Document=PHOTO		-do=Photo   \'  >>  $brotherlpdwrapper
echo  '    Document=GRAPH		-doc=Graphics   \'  >>  $brotherlpdwrapper
echo  '    Document=CUSTOM		-doc=Custom   \'  >>  $brotherlpdwrapper
echo  '    ColorMatching=NATURAL	-cm=Natural   \'  >>  $brotherlpdwrapper
echo  '    ColorMatching=VIVID		-cm=Vivid   \'  >>  $brotherlpdwrapper
echo  '    ColorMatching=NONE		-cm=None   \'  >>  $brotherlpdwrapper
echo  '    HalfTone=DIFFUSION		-ht=Diffusion   \'  >>  $brotherlpdwrapper
echo  '    HalfTone=DITHER		-ht=Dither   \'  >>  $brotherlpdwrapper
echo  '    ColorEnhance=OFF		-ce=OFF   \'  >>  $brotherlpdwrapper
echo  '    ColorEnhance=ON		-ce=ON   \'  >>  $brotherlpdwrapper
echo  '    Z                           Z)'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  'set brcommands2 = (\'  >>  $brotherlpdwrapper
echo  '    Copies=			-copy=   \'  >>  $brotherlpdwrapper
echo  '    Brightness=			-brit=   \'  >>  $brotherlpdwrapper
echo  '    Contrast=			-cont   \'  >>  $brotherlpdwrapper
echo  '    RedKey=			-red=   \'  >>  $brotherlpdwrapper
echo  '    GreenKey=			-green=   \'  >>  $brotherlpdwrapper
echo  '    BlueKey=			-blue=   \'  >>  $brotherlpdwrapper
echo  '    Z                            Z)'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  'if($LOGFILE != "/dev/null") then'  >>  $brotherlpdwrapper
echo  '    rm -f $LOGFILE'  >>  $brotherlpdwrapper
echo  '    echo "arg0 = $0"                                     >>$LOGFILE'  >>  $brotherlpdwrapper
echo  '    echo "arg1 = $1"                                     >>$LOGFILE'  >>  $brotherlpdwrapper
echo  '    echo "arg2 = $2"                                     >>$LOGFILE'  >>  $brotherlpdwrapper
echo  '    echo "arg3 = $3"                                     >>$LOGFILE'  >>  $brotherlpdwrapper
echo  '    echo "arg4 = $4"                                     >>$LOGFILE'  >>  $brotherlpdwrapper
echo  '    echo "arg5 = $5"                                     >>$LOGFILE'  >>  $brotherlpdwrapper
echo  '    echo "arg6 = $6"                                     >>$LOGFILE'  >>  $brotherlpdwrapper
echo  'endif'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  'if(!(-e /usr/local/Brother/lpd/filterMFC3820CN)) then'  >>  $brotherlpdwrapper
echo  '    echo "ERROR: /usr/local/Brother/lpd/filterMFC3820CN does not exist"                      >>$LOGFILE'  >>  $brotherlpdwrapper
echo  '    exit(0)'  >>  $brotherlpdwrapper
echo  'endif'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  'if(-e /usr/bin/brprintconfij) then'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  '  set  INPUT_TEMP_LINE'  >>  $brotherlpdwrapper
echo  '  set  INPUT_TEMP_OPTIONS=`mktemp /tmp/br_input.XXXXXX`'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  '  echo  $5 |tr " " "\n" > $INPUT_TEMP_OPTIONS'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  '  set INPUT_TEMP_LINE="`grep sides= $INPUT_TEMP_OPTIONS`"'  >>  $brotherlpdwrapper
echo  '  if($INPUT_TEMP_LINE == "sides=two-sided-long-edge")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -dx ON -dxt LONG                           >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -dx ON -dxt LONG"                    >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if($INPUT_TEMP_LINE == "sides=two-sided-short-edge")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -dx ON -dxt SHORT                          >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -dx ON -dxt SHORT"                   >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if($INPUT_TEMP_LINE == "sides=one-side")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -dx OFF                                    >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -dx OFF"                             >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  endif'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  '  set INPUT_TEMP_LINE="`grep media $INPUT_TEMP_OPTIONS`"'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  '  if     (`(echo $INPUT_TEMP_LINE | grep  "A4")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt A4                                     >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt A4"                              >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "Letter")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt LT                                     >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt LT"                              >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "Leagal")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt LGL                                    >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt LGL"                             >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "Exective")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt EXE                                    >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt EXE"                                  >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "A5")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt A5                                     >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt A5"                              >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "A6")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt A6                                     >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt A6"                              >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "B5")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt B5                                     >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt B5"                              >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "B6")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt B6                                     >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt B6"                              >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "C5")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt C5                                     >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt C5"                               >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "=DL")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt DL                                     >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt DL"                              >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  ",DL")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt DL                                     >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt DL"                              >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "DL,")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt DL                                     >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt DL"                              >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "A3")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt A3                                     >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt A3"                              >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "COM10")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt COM-10                                 >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt COM-10"                          >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "COM-10")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt COM-10                                 >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt COM-10"                          >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "Monarch")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt MONARCH                                >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt MONARCH"                         >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "EnvC5")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt C5                                     >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt C5"                              >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "EnvDL")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt DL                                     >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt DL"                              >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "env10")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt COM-10                                 >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt COM-10"                          >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "EnvCOM10")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt COM-10                                 >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt COM-10"                          >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "EnvMonarch")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt MONARCH                                >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt MONARCH"                         >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  endif'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  '  if     (`(echo $INPUT_TEMP_LINE | grep  "PlainPaper")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -md PLAIN                                  >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -md PLAIN"                           >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "ThinPaper")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -md THIN                                   >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -md THIN"                            >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "ThickPaper")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -md THICK                                  >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -md THICK"                           >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "ThickerPaper")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -md THICKER                                >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -md THICKER"                         >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "BondPaper")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -md BOND                                  >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -md BOND"                           >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "Transparencies")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -md TRANS                                 >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -md TRANS"                          >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "Env.Thick")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -md ENV_THICK                             >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -md ENV_THICK"                      >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "Env.Thin")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -md ENV_THIN                              >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -md ENV_THIN"                       >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "InkjetPaper")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -md INKJET                                >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -md INKJET"                         >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "Glossy4")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -md GLOSSY4                               >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -md GLOSSY4"                        >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "Glossy3")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -md GLOSSY3                               >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -md GLOSSY3"                        >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "Transpare")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -md TRANS                                 >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -md TRANS"                          >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep  "TranspareMirror")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -md TRANSMIR                              >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -md TRANSMIR"                       >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  endif'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  '  if     (`(echo $INPUT_TEMP_LINE | grep -i  "Manual")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -ps MANUAL                                 >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -ps MANUAL"                          >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep -i  "MpTray")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -ps MPN                                    >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -ps MPN"                             >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep -i  "Tray1")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt T1                                     >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt T1"                              >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  else if(`(echo $INPUT_TEMP_LINE | grep -i  "Tray2")` != "")then'  >>  $brotherlpdwrapper
echo  '    brprintconfij -P MFC3820CN -pt T2                                     >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    echo "brprintconfij -P MFC3820CN -pt T2"                              >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '  endif'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  '  set i = 1'  >>  $brotherlpdwrapper
echo  '  while("$brcommands[$i]" != "Z")'  >>  $brotherlpdwrapper
echo  '    if("`grep $brcommands[$i] $INPUT_TEMP_OPTIONS`" != "")then'  >>  $brotherlpdwrapper
echo  '	@ i ++'  >>  $brotherlpdwrapper
echo  '	brprintconfij -P MFC3820CN  $brcommands[$i]                            >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '	echo "brprintconfij -P MFC3820CN  $brcommands[$i]"                     >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '	@ i --'  >>  $brotherlpdwrapper
echo  '    endif'  >>  $brotherlpdwrapper
echo  '    @ i += 2'  >>  $brotherlpdwrapper
echo  '  end'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  '  set option2'  >>  $brotherlpdwrapper
echo  '  set i = 1'  >>  $brotherlpdwrapper
echo  '  set ii = 2'  >>  $brotherlpdwrapper
echo  '  while("$brcommands2[$i]" != "Z")'  >>  $brotherlpdwrapper
echo  '    set INPUT_TEMP_LINE=`grep $brcommands2[$i] $INPUT_TEMP_OPTIONS`'  >>  $brotherlpdwrapper
echo  '    if($INPUT_TEMP_LINE != "")then'  >>  $brotherlpdwrapper
echo  '	set option2="brprintconfij -P MFC3820CN  $INPUT_TEMP_LINE"'  >>  $brotherlpdwrapper
echo  '	set option2="`echo $option2 | sed s/$brcommands2[$i]/$brcommands2[$ii]/`"'  >>  $brotherlpdwrapper
echo  '	$option2                                             >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '	echo $option2                                        >>&"$LOGFILE"'  >>  $brotherlpdwrapper
echo  '    endif'  >>  $brotherlpdwrapper
echo  '    @ i += 2'  >>  $brotherlpdwrapper
echo  '    @ ii += 2'  >>  $brotherlpdwrapper
echo  '  end'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  'else'  >>  $brotherlpdwrapper
echo  '    echo "WARNING: /usr/bin/brprintconfij does not exist"           >>$LOGFILE'  >>  $brotherlpdwrapper
echo  'endif'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  'rm -f $INPUT_TEMP_OPTIONS'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  '    echo ""                                             >>$LOGFILE'  >>  $brotherlpdwrapper
echo  '    echo "    -----------PostScript Data-------------"  >>$LOGFILE'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  'if ($#argv >= 7) then'  >>  $brotherlpdwrapper
echo  '    if($LOGFILE != "/dev/null") then'  >>  $brotherlpdwrapper
echo  '	cat $6                                          >>$LOGFILE'  >>  $brotherlpdwrapper
echo  '    endif'  >>  $brotherlpdwrapper
echo  '	cat $6 | /usr/local/Brother/lpd/filterMFC3820CN'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  'else'  >>  $brotherlpdwrapper
echo  '    if($LOGFILE != "/dev/null") then'  >>  $brotherlpdwrapper
echo  '	set  INPUT_TEMP_PS=`mktemp /tmp/br_input.XXXXXX`'  >>  $brotherlpdwrapper
echo  '	cat    > $INPUT_TEMP_PS'  >>  $brotherlpdwrapper
echo  '	cat    $INPUT_TEMP_PS | /usr/local/Brother/lpd/filterMFC3820CN'  >>  $brotherlpdwrapper
echo  '	cat    $INPUT_TEMP_PS                           >>$LOGFILE'  >>  $brotherlpdwrapper
echo  '	rm -f  $INPUT_TEMP_PS'  >>  $brotherlpdwrapper
echo  '    else'  >>  $brotherlpdwrapper
echo  '	cat    | /usr/local/Brother/lpd/filterMFC3820CN'  >>  $brotherlpdwrapper
echo  '    endif'  >>  $brotherlpdwrapper
echo  'endif'  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
echo  ''  >>  $brotherlpdwrapper
chmod a+x $brotherlpdwrapper
chmod a+w /usr/local/Brother/inf/brMFC3820CNrc
/etc/init.d/lpd stop
/etc/init.d/cups restart

