1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-26 01:24:59 +02:00

scripts/fpd2pdf: Print a set of Fped files into a PDF

This commit is contained in:
Werner Almesberger 2010-08-27 23:29:13 -03:00
parent daa45012a4
commit 9e91233c56

36
scripts/fpd2pdf Executable file
View File

@ -0,0 +1,36 @@
#!/bin/bash
#
# fpd2pdf - Print a set of Fped files into a PDF
#
# Written 2010 by Werner Almesberger
# Copyright 2010 Werner Almesberger
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
usage()
{
echo "usage: $0 [-o out.pdf] file.pdf ..." 1>&2
exit 1
}
out=-
while true; do
case "$1" in
-o) [ -z "$2" ] && usage
out="$2"
shift 2;;
-*) usage;;
*) break;;
esac
done
[ -z "$1" ] && usage
eval gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$out -f \
`for n in "$@"; do echo "<(fped -p \"$n\" -)"; done`