summaryrefslogblamecommitdiffstats
path: root/printloop.sh
blob: 74ad25e94dcaa54367a32a5317895509e0beedd5 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                   
#!/bin/sh

printer="/dev/labelprinter"
queuedir=queue

print_queue(){
	for job in $(ls -1 "$queuedir/new"); do
		./trigger.sh "$printer" "$queuedir"
	done
}

print_queue
while inotifywait --quiet "$queuedir/new" /dev; do
	print_queue
done