Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 28th, 2012  |  syntax: Bash  |  size: 0.32 KB  |  hits: 38  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/bash
  2.  
  3. rm -f *.pdf
  4.  
  5. for file in *.odt
  6. do
  7.     echo "converting $file"
  8.     ooffice -headless -pt Generic-CUPS-PDF-Printer $file
  9.  
  10.     mv ~/`basename $file odt`pdf .
  11. done
  12.  
  13. file_list=`ls chapter?.pdf`
  14.  
  15. echo "building thesis"
  16. gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=thesis.pdf $file_list
  17.  
  18. echo "done"