foomatic-test
来自「Linux下的无线网卡通用驱动程序」· 代码 · 共 43 行
TXT
43 行
#!/bin/sh## Test a new foomatic printer entry.# # This stuff should be passable on the command line to make this script generic# TODOMAINDB=/usr/share/foomatic/db/sourceNEWDB=./foomatic-dbPRINTER="Lexmark-Z43"DRIVER=drv_z42PRINTER="Minolta-magicolor_2300_DL"DRIVER=foo2zjsOPTIONS="-o Resolution=600x600"OPTIONS=OPTIONS="-o ColorMode=Color -o Nup=2up"# Copy the new DB XML files into the main databasefor dir in driver printer opt; do root cp $NEWDB/$dir/*.xml $MAINDB/$dirdone# Issue a command to make foomatic recognize the new DB entriesroot rm -rf /var/cache/foomatic/*/*(cd /var/cache/foomatic/compiled; root foomatic-combo-xml -O >overview.xml)# Create the perl script that drives the printer with the above optionsfoomatic-datafile -t direct -p $PRINTER -d $DRIVER > xxx.foo# Fix the directomatic script so it produces useful informationsed < /usr/bin/directomatic > xxxomatic \ -e 's/debug=0/debug=1/' \ -e 's#/tmp/prnlog#xxx.prnlog#'chmod +x xxxomatic# Run the script./xxxomatic -P xxx.foo $OPTIONS testpage.ps > xxx.prn# Ferret out the useful informationsed -n 's/.*running: \(.*\)/\1/p' xxx.prnlog
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?