Commit 292f33a9 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Use preferred printer if available

parent e99dac43
#!/bin/sh
#!/bin/bash
if [ -z "${PRINTER}" ] ; then
export PRINTER=Forsberg
fi
if [ $# -ne 1 ] ; then
echo "You need to specify pallet number" 1>&2
exit 1
fi
TARGET="data/pall$1"
TARGET="data/pall$(printf '%03d' $1)"
if [ ! -f "${TARGET}" ] ; then
echo "${TARGET does not exist}" 1>&2
exit 1
fi
rst2pdf -s tools/pall.sty ${TARGET} /dev/stdout | PRINTER=Forsberg lpr
rst2pdf -s tools/pall.sty ${TARGET} /dev/stdout | lpr
......@@ -2,10 +2,14 @@
set -e
if [ -z "${PRINTER}" ] ; then
export PRINTER=Forsberg
fi
if [ $# -ne 3 ] ; then
echo "Run as $0 FIRST LAST 'content origin'" 1>&2
echo " $0 1 10 'Robotkyrkogård'" 1>&2
exit 1
fi
$(dirname $0)/pallet-label "$@" | PRINTER=Forsberg lpr
$(dirname $0)/pallet-label "$@" | lpr
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment