aboutsummarylogtreecommitdiffstats
path: root/mk-udev-rules
blob: bea0c83ee104fcbca084e736be235becce7b2362 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/gawk -f

BEGIN {
	FS = ",";
	print "ACTION==\"add\", ATTR{idVendor}==\"04f9\", GOTO=\"brscan5\"";
	print "GOTO=\"brscan5_end\"";
	print "LABEL=\"brscan5\"";
}
NF >= 3 && $1 ~ /^ *0[xX][[:xdigit:]]+ *$/ {
	id = "000" tolower( substr( $1, 3 ));
	id = substr( id, length( id ) - 3 );
	#print "ATTR{idProduct}==\"" id "\", MODE=\"0664\", GROUP=\"scanner\", ENV{libsane_matched}=\"yes\"";
	print "ATTR{idProduct}==\"" id "\", MODE=\"0664\", GROUP=\"lp\", ENV{libsane_matched}=\"yes\"";
}
END {
	print "LABEL=\"brscan5_end\"";
}