Date:2010-11-13 22:47:36 (13 years 4 months ago)
Author:Werner Almesberger
Commit:6f8665e5a200b4235b8eb13c8ecdd3df3f8cb5fd
Message:scripts/fpd2pdf: moved over to eda-tools

Files: scripts/fpd2pdf (1 diff)

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
15usage()
16{
17    cat <<EOF 1>&2
18usage: $0 [-a] [-o out.pdf] file.fpd ...
19
20  -a also include files whose name contains a tilde (backup files)
21  -o out.pdf write to the specified file (default: standard output)
22EOF
23    exit 1
24}
25
26
27out=-
28all=false
29
30while true; do
31    case "$1" in
32    -a) all=true
33    shift;;
34    -o) [ -z "$2" ] && usage
35    out="$2"
36    shift 2;;
37    -*) usage;;
38    *) break;;
39    esac
40done
41
42[ -z "$1" ] && usage
43
44eval gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$out -f \
45  `for n in "$@"; do $all || [ "$n" = "${n/\~/}" ] && \
46  echo "<(fped -p \"$n\" -)"; done`

Archive Download the corresponding diff file



interactive