From 5fea41506ea2778b2908861a391fa4b52457f0b1 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 6 Dec 2012 14:49:44 +0100 Subject: scan-multi: remove unneeded files Signed-off-by: Florian Pritz --- scan-multi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'scan-multi') 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 -- cgit v1.2.3-24-g4f1b