summaryrefslogtreecommitdiffstats
path: root/scan-multi
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-12-06 14:49:44 +0100
committerFlorian Pritz <bluewind@xinu.at>2012-12-06 14:51:39 +0100
commit5fea41506ea2778b2908861a391fa4b52457f0b1 (patch)
tree688048d1fc345db09d284abee0c392a1922855dd /scan-multi
parent11884f7ef3235f4be3324e569fa804a07a5336bb (diff)
downloadbin-5fea41506ea2778b2908861a391fa4b52457f0b1.tar.gz
bin-5fea41506ea2778b2908861a391fa4b52457f0b1.tar.xz
scan-multi: remove unneeded files
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'scan-multi')
-rwxr-xr-xscan-multi5
1 files changed, 2 insertions, 3 deletions
diff --git a/scan-multi b/scan-multi
index 522a42a..44b580c 100755
--- a/scan-multi
+++ b/scan-multi
@@ -6,11 +6,10 @@ i=1
while [[ -e "out$i.pnm" ]]; do
img="out$i.pnm"
newname="$(printf "%s_%03d" "$time" "$i")"
- convert "$img" -normalize -quality 95 "$newname.jpg"
- mv "$img" "$newname.pnm"
+ convert "$img" -normalize -quality 95 "$newname.jpg" && rm "$img"
((i++))
done
if [[ $1 = "--pdf" ]]; then
- convert "${time}"_*.jpg -resize 1500x1500 "${time}.pdf"
+ convert "${time}"_*.jpg -resize 1500x1500 "${time}.pdf" && rm "${time}"_*.jpg
fi