Skip to content

Commit 8427af7

Browse files
Implement case control in committee script (#807)
* Implement case control in committee script * Fix space handling
1 parent 33e77cd commit 8427af7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

_scripts/committee.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,17 @@ if [[ -z "$committee" ]]; then
1616
exit 1
1717
fi
1818

19+
find "$committee/full/" -type f -print0 | while IFS= read -r -d '' file; do
20+
if [[ "$file" =~ [A-Z] || "$file" =~ [[:space:]] ]]; then
21+
mv "$file" "$(echo "$file" | tr '[:upper:]' '[:lower:]' | sed 's/ /_/g')"
22+
fi
23+
done
24+
1925
resolution="250x250"
2026

2127
mkdir -p $committee/mini/
22-
for picture in $committee/full/*; do
28+
29+
find "$committee/full/" -type f -print0 | while IFS= read -r -d '' picture; do
2330
convert $picture -resize $resolution^ -gravity center -crop $resolution+0+0 $committee/mini/`basename $picture`
2431
done
2532

0 commit comments

Comments
 (0)