Date:2010-08-29 03:58:04 (8 years 10 months ago)
Author:Werner Almesberger
Commit:b3728b5c54d91dbb712e81c9404065e62cd66b18
Message:fpd2pdf: ignore fped backup files (and option -a to still use them)

- scripts/fpd2pdf: ignore files whose name contains a tilde
- scripts/fpd2pdf: option -a to also use files whose name contains a tilde
Files: scripts/fpd2pdf (2 diffs)

Change Details

scripts/fpd2pdf
1414
1515usage()
1616{
17    echo "usage: $0 [-o out.pdf] file.pdf ..." 1>&2
17    cat <<EOF 1>&2
18usage: $0 [-a] [-o out.pdf] file.pdf ...
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
1823    exit 1
1924}
2025
2126
2227out=-
28all=false
29
2330while true; do
2431    case "$1" in
32    -a) all=true
33    shift;;
2534    -o) [ -z "$2" ] && usage
2635    out="$2"
2736    shift 2;;
...... 
3342[ -z "$1" ] && usage
3443
3544eval gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$out -f \
36    `for n in "$@"; do echo "<(fped -p \"$n\" -)"; done`
45  `for n in "$@"; do $all || [ "$n" = "${n/\~/}" ] && \
46  echo "<(fped -p \"$n\" -)"; done`

Archive Download the corresponding diff file



interactive