]> Sergey Matveev's repositories - dotfiles.git/commitdiff
Cleanup empty file
authorSergey Matveev <stargrave@stargrave.org>
Sun, 10 Mar 2024 07:51:43 +0000 (10:51 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sun, 10 Mar 2024 07:51:43 +0000 (10:51 +0300)
img/bin/my-transcode-jpg

index 616323bf65ed21c56dc1e3565be3e6b65734618f..bf4863daf8e5b48763bbda22e2fd3ad44a1ad4aa 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh -e
 
 tmp=`mktemp`
-trap "rm -f $tmp.jpg" HUP PIPE INT QUIT TERM EXIT
+trap "rm -f $tmp $tmp.jpg" HUP PIPE INT QUIT TERM EXIT
 jpegtran -optimize -progressive -perfect -copy all "$1" > $tmp.jpg
 cjxl $tmp.jpg "${1%.*}.jxl" --distance=0 --effort=9 --brotli_effort=11 --lossless_jpeg=1
 [ -s "${1%.*}.jxl" ]