aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorla-ninpre <leobrekalini@gmail.com>2021-08-19 09:41:39 +0300
committerla-ninpre <leobrekalini@gmail.com>2021-08-19 09:41:39 +0300
commit2611b42c5d2f4302592b3f7957830e2966b0a524 (patch)
tree205cdf952def183c9221f2d28504c148e43ca4dc
parent11f9a234bec76d8fbc564fff0e90ba519a7c66f9 (diff)
downloadaaoth.xyz-2611b42c5d2f4302592b3f7957830e2966b0a524.tar.gz
aaoth.xyz-2611b42c5d2f4302592b3f7957830e2966b0a524.zip
fix thumbnail generation on every push
post-receive git hook is also tweaked. since thumbnails aren't needed on site build time, they can be created after by copying `thumbs.sh` script into site art directory, running it and deleting afterwards. `hooks/post-receive` ``` { cp "$TMP_GIT_CLONE/art/thumbs.sh" "$PUBLIC_WWW/art/thumbs.sh" cd "$PUBLIC_WWW/art" sh thumbs.sh rm thumbs.sh } ```
-rwxr-xr-xart/thumbs.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/art/thumbs.sh b/art/thumbs.sh
index 758b0a9..71be5b4 100755
--- a/art/thumbs.sh
+++ b/art/thumbs.sh
@@ -30,7 +30,11 @@ do
[ -d "$_thumbs_dir" ] || mkdir "$_thumbs_dir"
- _imgs="$(find . -maxdepth 1 -type f | cut -b 3-)"
+ _imgs="$(find . -maxdepth 1 \
+ -iname "*.jpg" -or \
+ -iname "*.jpeg" -or \
+ -iname "*.gif" -or \
+ -iname "*.png" -type f | cut -b 3-)"
for _img in $_imgs
do
_ext="${_img##*.}"