X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=handlers%2F40_attachment.sh;h=bddaa47105f11433f58925864836cc4c1795471e;hb=fdfe0310c6bc644da671b847120e0bd84d923634;hp=fc0b0f983ff00aee3a0787c1e38761315d973697;hpb=11b34efdbb85ef0accaf366b25f952f41e1b4aa4;p=shellwiki diff --git a/handlers/40_attachment.sh b/handlers/40_attachment.sh index fc0b0f9..bddaa47 100755 --- a/handlers/40_attachment.sh +++ b/handlers/40_attachment.sh @@ -42,9 +42,8 @@ attachment_convert(){ case $attpath in *.[jJ][pP][gG]|*.[jJ][pP][eE][gG]|*.[pP][nN][gG]) - read junk junk res junk <<-EOF - $(identify -- "$attpath") - EOF + res="$(identify -- "$attpath")" + res="${res% * * * * * *}" res="${res##* }" if [ "${res%x*}" -gt 2048 ]; then convert "$attpath" -resize 1920x-2 -quality 85 "$cachepath" else