aboutsummaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorThedro Neely <thedroneely@gmail.com>2019-08-17 22:30:37 -0400
committerThedro Neely <thedroneely@gmail.com>2019-08-17 22:30:37 -0400
commit6fd8849424a59e54529bab53cc9e5bbc963ce123 (patch)
tree5e1f24d27720138c7a0ccc0ad10636953ca53397 /bootstrap
parent2ac4e50c5bcbb10d645c26e9511edc12ce59cba9 (diff)
downloadthedroneely.com-6fd8849424a59e54529bab53cc9e5bbc963ce123.tar.gz
thedroneely.com-6fd8849424a59e54529bab53cc9e5bbc963ce123.tar.bz2
thedroneely.com-6fd8849424a59e54529bab53cc9e5bbc963ce123.zip
bootstrap/helpers/update-thumbnails: Compress thumbnails when updating
Improve execution
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap/helpers/update-thumbnails9
1 files changed, 6 insertions, 3 deletions
diff --git a/bootstrap/helpers/update-thumbnails b/bootstrap/helpers/update-thumbnails
index 7175794..604bc0f 100755
--- a/bootstrap/helpers/update-thumbnails
+++ b/bootstrap/helpers/update-thumbnails
@@ -1,6 +1,9 @@
#!/bin/bash
-cd images/ && touch .update-thumbnails || exit 1;
-mogrify -path thumbnails/ -auto-orient -quiet -thumbnail x222 $(find . -maxdepth 1 -type f -mtime -1) || echo 'No Images Updated.' && exit 1;
-rename jpg png thumbnails/*;
+cd images || exit 1;
+mogrify -path thumbnails -auto-orient -quiet -thumbnail x222 $(find . -maxdepth 1 -type f -mtime -1);
+mogrify -format png -quiet thumbnails/*.jpg;
+rm -f thumbnails/*.jpg
+find thumbnails -name '*.png' -mtime -1 -exec pngquant --quality 85 --ext .png --force {} \;
+touch .update-thumbnails;
echo Image Thumbnails in "'$(pwd)'" updated.;