repo.or.cz
/
ccbib.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Scroogled: Fix formatting error
[ccbib.git]
/
scripts
/
demo
blob
9b8fcc429937a8e87a2c01f38d200a261ff1e2da
1
#!/bin/sh
2
3
if
[
-z
"
$2
"
];
then
4
output
=
$
(
basename
$1
)
5
else
6
output
=
$2
7
fi
8
9
bbox
() {
10
x
=
$1
11
y
=
$2
12
w
=
$3
13
h
=
$4
14
}
15
16
bbox $
(
sed
-n -e
"s/^%%BoundingBox: //p"
$1
)
17
18
new_bb
=
"0 0 $((2*
$w
))
$h
"
19
20
psselect
-p
2
-,
1
$1
| pstops
"2:0+1(
$w
,0)"
| strippagesize
"
$new_bb
"
>
demo_
$output