#!/bin/sh
#
# wrapper for 600x600 dpi color printing on A4
# produces cZ11 style "blurred" printouts
#

SomSomBlack=1
cNull=0

# to have a som-som style black ink invokation we need 
# two "0" arguments and 
# one non-zero argument (3 args in sum)

if [ $# -eq 3 ] ; then
  for i in $* ; do
    
    # on a "0" we count the "0"s
    if [ "$i" == "0" ] ; then
      let "cNull = cNull + 1"
    # if it is a non-0 it must be a digit !=0 
    else
      let "x = 0 + i"
      if [ $x == 0 ] ; then
        SomSomBlack=0
      fi
    fi  
  done
  if [ $cNull != 2 ] ; then
    SomSomBlack=0
  fi
else
  SomSomBlack=0
fi

if [ $SomSomBlack == 1 ] ; then
  cZ11-V2 --bitcmyk=1x1--gray-scale --size=4958x7017
else
  cZ11-V2 --bitcmyk=1x1 --size=4958x7017
fi
