diff options
author | Thedro Neely <thedroneely@gmail.com> | 2019-12-01 19:08:24 -0500 |
---|---|---|
committer | Thedro Neely <thedroneely@gmail.com> | 2019-12-01 19:08:24 -0500 |
commit | d35bc8601a1cac78b0167bb373714b157e91f245 (patch) | |
tree | ce3194e0d899ae9a4de58766aa7ca4b0abe97fb6 /bootstrap | |
parent | b12568e1d1836fbdd1832a9a1f0d7bacdb683087 (diff) | |
download | thedroneely.com-d35bc8601a1cac78b0167bb373714b157e91f245.tar.gz thedroneely.com-d35bc8601a1cac78b0167bb373714b157e91f245.tar.bz2 thedroneely.com-d35bc8601a1cac78b0167bb373714b157e91f245.zip |
bootstrap/helpers/update-thumbnails: Search jpg and png only
Reduce compression to files modified about an hour ago
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap/helpers/update-thumbnails | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bootstrap/helpers/update-thumbnails b/bootstrap/helpers/update-thumbnails index e3fa485..80dc5ec 100755 --- a/bootstrap/helpers/update-thumbnails +++ b/bootstrap/helpers/update-thumbnails @@ -1,10 +1,10 @@ #!/bin/bash cd images || exit 1; -mogrify -path thumbnails -auto-orient -quiet -thumbnail x222 $(find . -maxdepth 1 -type f -mtime -1); +mogrify -path thumbnails -auto-orient -quiet -thumbnail x222 $(find -maxdepth 1 -regex '.*\.\(jpg\|png\)' -type f -mmin -60); mogrify -format png -quiet thumbnails/*.jpg; rm -f thumbnails/*.jpg -find -name '*.png' -mtime -1 -exec pngquant --quality 85 --ext .png --force {} \; -find -name '*.jpg' -mtime -1 -exec jpegoptim -m 85 {} + +find -name '*.png' -mmin -60 -exec pngquant -v --quality 85 --ext .png --force {} \; +find -name '*.jpg' -mmin -60 -exec jpegoptim -v -m 85 {} + touch .update-thumbnails; echo Image Thumbnails in "'$(pwd)'" updated.; |