mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-22 19:42:48 +02:00
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
This commit is contained in:
parent
9e91233c56
commit
b3728b5c54
@ -14,14 +14,23 @@
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "usage: $0 [-o out.pdf] file.pdf ..." 1>&2
|
||||
cat <<EOF 1>&2
|
||||
usage: $0 [-a] [-o out.pdf] file.pdf ...
|
||||
|
||||
-a also include files whose name contains a tilde (backup files)
|
||||
-o out.pdf write to the specified file (default: standard output)
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
out=-
|
||||
all=false
|
||||
|
||||
while true; do
|
||||
case "$1" in
|
||||
-a) all=true
|
||||
shift;;
|
||||
-o) [ -z "$2" ] && usage
|
||||
out="$2"
|
||||
shift 2;;
|
||||
@ -33,4 +42,5 @@ done
|
||||
[ -z "$1" ] && usage
|
||||
|
||||
eval gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$out -f \
|
||||
`for n in "$@"; do echo "<(fped -p \"$n\" -)"; done`
|
||||
`for n in "$@"; do $all || [ "$n" = "${n/\~/}" ] && \
|
||||
echo "<(fped -p \"$n\" -)"; done`
|
||||
|
Loading…
Reference in New Issue
Block a user