updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / brother-hl2070n / brother-hl2070n.install
blobe786cfc566c6178931d6080e226de4ecaac3be7e
1 post_install() {
2   __port2=`lpinfo -v | grep -i 'usb://Brother/HL-2070N%20series' | head -1`
3   if [ "$__port2" = '' ];then
4           __port2=`lpinfo -v | grep 'usb://' | head -1`
5   fi
6   __port=`echo $__port2| sed s/direct//g`
7   if [ "$__port" = '' ];then
8           __port="usb:/dev/usb/lp0"
9   fi
11   lpadmin -p HL2070N -E -v $__port -P /usr/share/cups/model/HL2070N.ppd
12   echo "If CUPS is not running now, start it after installation"
13   echo "and type command:" 
14   echo "  lpadmin -p HL2070N -E -v URL -P /usr/share/cups/model/HL2070N.ppd"
15   echo "where URL can be found using command:"
16   echo "  lpinfo -v | grep -i 'Brother'"
17   echo "You can also register new printer using web interface at:"
18   echo "  http://localhost:631/"
21 post_upgrade() {
22   /bin/true
25 pre_remove() {
26   lpadmin -x HL2070N
30 op=$1
31 shift
33 $op "$@"