Change Details
scripts/fpd2pdf |
| 1 | #!/bin/bash |
| 2 | # |
| 3 | # fpd2pdf - Print a set of Fped files into a PDF |
| 4 | # |
| 5 | # Written 2010 by Werner Almesberger |
| 6 | # Copyright 2010 Werner Almesberger |
| 7 | # |
| 8 | # This program is free software; you can redistribute it and/or modify |
| 9 | # it under the terms of the GNU General Public License as published by |
| 10 | # the Free Software Foundation; either version 2 of the License, or |
| 11 | # (at your option) any later version. |
| 12 | # |
| 13 | |
| 14 | |
| 15 | usage() |
| 16 | { |
| 17 | echo "usage: $0 [-o out.pdf] file.pdf ..." 1>&2 |
| 18 | exit 1 |
| 19 | } |
| 20 | |
| 21 | |
| 22 | out=- |
| 23 | while true; do |
| 24 | case "$1" in |
| 25 | -o) [ -z "$2" ] && usage |
| 26 | out="$2" |
| 27 | shift 2;; |
| 28 | -*) usage;; |
| 29 | *) break;; |
| 30 | esac |
| 31 | done |
| 32 | |
| 33 | [ -z "$1" ] && usage |
| 34 | |
| 35 | eval gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$out -f \ |
| 36 | `for n in "$@"; do echo "<(fped -p \"$n\" -)"; done` |
Download the corresponding diff file