mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-26 07:51:53 +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()
|
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
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
out=-
|
out=-
|
||||||
|
all=false
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
-a) all=true
|
||||||
|
shift;;
|
||||||
-o) [ -z "$2" ] && usage
|
-o) [ -z "$2" ] && usage
|
||||||
out="$2"
|
out="$2"
|
||||||
shift 2;;
|
shift 2;;
|
||||||
@ -33,4 +42,5 @@ done
|
|||||||
[ -z "$1" ] && usage
|
[ -z "$1" ] && usage
|
||||||
|
|
||||||
eval gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$out -f \
|
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