X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=x%2F.local%2Fbin%2Fthumbnailer.sh;h=9c7edebeb3cf2e5d212f60895e2b82013347a027;hb=d9616f0a4516f0dd1e8fe7163d8c235998517aae;hp=0867ee987a76a76799b3c3b19589e30a9886f2eb;hpb=e26d42e86a5cecb2c9b75be5b2e7bcea41d19c1f;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"