diff options
author | Thedro Neely <thedroneely@gmail.com> | 2020-06-19 05:17:53 -0400 |
---|---|---|
committer | Thedro Neely <thedroneely@gmail.com> | 2020-06-19 05:17:53 -0400 |
commit | 597f7d5bb024f09278df7da86676ae537337785a (patch) | |
tree | 11a788ce14568f304b5afe0d5cda0538fc6d18d0 /bootstrap/helpers | |
parent | a3fa11046d7d5796da3d56df9522bff9d2eda9c2 (diff) | |
download | thedroneely.com-597f7d5bb024f09278df7da86676ae537337785a.tar.gz thedroneely.com-597f7d5bb024f09278df7da86676ae537337785a.tar.bz2 thedroneely.com-597f7d5bb024f09278df7da86676ae537337785a.zip |
bootstrap/helpers/update-thumbnails: Shell strict mode
Diffstat (limited to 'bootstrap/helpers')
-rwxr-xr-x | bootstrap/helpers/update-thumbnails | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/bootstrap/helpers/update-thumbnails b/bootstrap/helpers/update-thumbnails index 80dc5ec..7411230 100755 --- a/bootstrap/helpers/update-thumbnails +++ b/bootstrap/helpers/update-thumbnails @@ -1,10 +1,9 @@ -#!/bin/bash - +#!/bin/sh -eu cd images || exit 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' -mmin -60 -exec pngquant -v --quality 85 --ext .png --force {} \; -find -name '*.jpg' -mmin -60 -exec jpegoptim -v -m 85 {} + +mogrify -path thumbnails -auto-orient -quiet -thumbnail x222 $(find . -maxdepth 1 -regex '.*\.\(jpg\|png\)' -type f -mmin -60); +mogrify -format png -quiet thumbnails/*.jpg || true; +rm -rf thumbnails/*.jpg; +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.; |