summaryrefslogtreecommitdiff
path: root/tools/gencovers.sh
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-10-30 15:11:54 +0100
committerTor Andersson <tor@ccxvii.net>2023-11-30 00:24:06 +0100
commit74bf5b55833402b05072cd6ace6fa8a9fc7f2235 (patch)
treede3dc767ca1e6007ccabf0ae76f1d373c753a1fc /tools/gencovers.sh
parent02484045349c235055dc099dae1d760ae4191bf1 (diff)
downloadserver-74bf5b55833402b05072cd6ace6fa8a9fc7f2235.tar.gz
Only update changed covers.
Diffstat (limited to 'tools/gencovers.sh')
-rw-r--r--tools/gencovers.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/gencovers.sh b/tools/gencovers.sh
index 8d4eacd..5d4d244 100644
--- a/tools/gencovers.sh
+++ b/tools/gencovers.sh
@@ -4,6 +4,9 @@ do
B=$(echo $F | sed s/.jpg// | sed s/.png//)
D=$(dirname $F)
+ if [ $F -nt $D/thumbnail.jpg ]
+ then
+
PORTRAIT=$(convert $F -format '%[fx:w<h]' info:)
SQUARE=$(convert $F -format '%[fx:w=h]' info:)
@@ -38,4 +41,6 @@ do
convert -colorspace RGB -resize $SIZE_TH $F -colorspace sRGB $D/thumbnail.png
pngtopnm $D/thumbnail.png | cjpeg -progressive -optimize -sample 1x1 -quality 95 > $D/thumbnail.jpg
rm -f $D/thumbnail.png
+
+ fi
done