X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=x%2F.local%2Fbin%2Fthumbnailer.sh;h=9c7edebeb3cf2e5d212f60895e2b82013347a027;hb=139a21003b07452b08c8d721d1f9342c5320d10e;hp=0867ee987a76a76799b3c3b19589e30a9886f2eb;hpb=4b436b147222f2e4b6be9be24e63114030ffdfd1;p=dotfiles.git diff --git a/x/.local/bin/thumbnailer.sh b/x/.local/bin/thumbnailer.sh index 0867ee9..9c7edeb 100755 --- a/x/.local/bin/thumbnailer.sh +++ b/x/.local/bin/thumbnailer.sh @@ -15,6 +15,7 @@ fi log "Processing $1 to $2" TMPDIR="$(mktemp -d)" +trap "rm -r $TMPDIR" EXIT log "Temp directory created in $TMPDIR" NUMPAGES=$(identify "$1" | wc -l) @@ -30,8 +31,3 @@ log "done!" montage -geometry +0+0 $TMPDIR/*.png "$2" log "Montaging done" - -rm -r $TMPDIR -log "Cleaned up" - -log "Done"