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