#!/bin/zsh
#create CS Printers for MacOS
#by Hanz Makmur
#This script requires HP Generic Postscript Driver to be installed first. No prior checking.
#https://support.apple.com/kb/dl1888?locale=en_US
#
genericdriver='/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/Resources/Generic.ppd'
printserver='lpd://printserver.cs.rutgers.edu'
duplexer='APOptionalDuplexer=True'
dontshare='printer-is-shared=false'

for printer in core3 core3c core3copier cbim_printer_2 hill2 hill3 hill3c hill4 
do
    /usr/sbin/lpadmin -p $printer -E -v $printserver/$printer \
         -P $genericdriver -o $duplexer -o $dontshare

done

