Move ingsw image checker script in utils/

This commit is contained in:
Marco Realacci 2023-07-09 02:34:24 +02:00
parent 6d86f40ee5
commit 2ae02f92b0
2 changed files with 0 additions and 1 deletions

17
utils/check-ingsw-photos.sh Executable file
View file

@ -0,0 +1,17 @@
#!/bin/bash
SEARCHDIR="./Ingegneria del Software/"
echo "Invalid URLs:"
for img in `grep "img" "$SEARCHDIR" -R | sed -E 's/^(.*?)\.txt\:img\=//'`; do
img=$(echo "$img"|tr -d '\n'|tr -d '\r')
curl -I "$img" 2>/dev/null | \
grep -i "Content-Type: image/" >/dev/null
if [ "$?" -ne 0 ]; then
(
cd "$SEARCHDIR"
grep "$img" . -R
)
fi
done