media/scripts/resize-thumbnails.sh

21 lines
278 B
Bash
Executable File

#!/bin/sh
set -e
cd "$(dirname "$0")"
. ./settings
cd ..
mkdir -p thumbnails-small
cd thumbnails
for x in *; do
large=$x
small=../thumbnails-small/$x
if ! [ -f $small ] || [ $large -nt $small ]; then
convert $x -resize x"$thumbnail_height" $small
fi
done