mirror of
https://github.com/appinfosapienza/so-un-bot.git
synced 2025-05-06 02:52:35 +02:00
Move ingsw image checker script in utils/
This commit is contained in:
parent
6d86f40ee5
commit
2ae02f92b0
2 changed files with 0 additions and 1 deletions
17
utils/check-ingsw-photos.sh
Executable file
17
utils/check-ingsw-photos.sh
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue