Browse Source

Add a handy lp-command to auto-select printers

Samuel W. Flint 3 years ago
parent
commit
9fbcdfd0e1
1 changed files with 13 additions and 0 deletions
  1. 13 0
      lp-command

+ 13 - 0
lp-command

@@ -0,0 +1,13 @@
+#!/bin/sh
+
+FILE=${@: -1}
+ARGS=${@:1:$#-1}
+
+if [ $1 == '-q' ] ; then
+    shift
+    addPrintJob ${FILE} ${ARGS} 
+elif atHome ; then
+    lp $@
+else
+    echo lpremote ${FILE} ${ARGS}
+fi