repo.or.cz
/
hband-tools.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
bugfixes, features, documentation, examples, new tool
[hband-tools.git]
/
pdfrotate
/
pdfflop
blob
c5ee32b0c26620bec399294a4adb815d88182045
1
#!/bin/bash
2
3
true
<<EOF
4
=pod
5
6
=head1 NAME
7
8
pdfflop - Flop a PDF file's pages
9
10
=cut
11
12
EOF
13
14
15
set -e
16
set -o
pipefail
17
set -u
18
19
input
=
''
20
output
=
''
21
22
while
[
$#
-gt
0
]
23
do
24
case
"
$1
"
in
25
--outfile
|
-o
)
26
shift
27
output
=
$1
28
;;
29
-*)
30
echo
"pdfflop: unknown option:
$1
"
>&
2
31
exit
1
32
;;
33
*)
34
if
[
-z
"
$input
"
]
35
then
36
input
=
$1
37
else
38
echo
"pdfflop: extra argument:
$1
"
>&
2
39
exit
2
40
fi
41
;;
42
esac
43
shift
44
done
45
46
pdf90
"
$input
"
-o
/
dev
/
stdout | pdfflip
/
dev
/
stdin
-o
/
dev
/
stdout | pdf270
/
dev
/
stdin
-o
"
$output
"