Skip to content

Commit fbb20ad

Browse files
committed
boards/update-thumb.sh: Create thumbnails for JPG and PNG images.
Signed-off-by: Damien George <[email protected]>
1 parent c862ee3 commit fbb20ad

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

boards/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
*/*.thumb.jpg
2+
*/*.thumb.png

boards/update-thumb.sh

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
#!/bin/bash
2-
rm */*.thumb.jpg
3-
for file in */*; do convert $file -thumbnail 300 ${file/.jpg/.thumb.jpg}; done
2+
3+
function update_thumb {
4+
ext=$1
5+
rm */*.thumb.$ext
6+
for file in */*.$ext; do
7+
echo "Processing $file"
8+
convert $file -thumbnail 300 ${file/.$ext/.thumb.$ext}
9+
done
10+
}
11+
12+
update_thumb jpg
13+
update_thumb png

0 commit comments

Comments
 (0)