Created
July 20, 2020 04:01
-
-
Save sumonst21/723e52c281ef79e1fe2cdcf72ab4db54 to your computer and use it in GitHub Desktop.
Check if thumbnail exists else generate resized thumbnail from original image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
for filename in *.jpg; do | |
FILE="thumbnails/$filename" | |
if [ ! -f "$FILE" ]; then | |
echo "$FILE does not exist." | |
convert $filename -resize 90x140! "thumbnails/$filename" | |
echo "Thumb Generated!" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment