pretty-print-code 321 B

12345678910111213141516171819
  1. #!/bin/sh
  2. if [ $# -lt 3 ] ; then
  3. echo "pretty-print-code lang output input"
  4. exit
  5. fi
  6. LANGUAGE=$1
  7. shift
  8. OUTPUTPDF=$1
  9. shift
  10. INPUT=$1
  11. shift
  12. OUTPUTPS=$(basename $OUTPUTPDF .pdf).ps
  13. a2ps -1rCB -l 120 --center-title='$n' --right-footer="%Q" --borders=no -E$LANGUAGE -o $OUTPUTPS $INPUT
  14. ps2pdf $OUTPUTPS
  15. rm $OUTPUTPS