2025-01-13 18:19:28 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
2025-01-13 18:32:09 +01:00
|
|
|
PWD_SC="$PWD"
|
|
|
|
|
|
|
|
|
|
attuale=$(<$PWD_SC/attuale.txt)
|
2025-01-13 18:19:28 +01:00
|
|
|
nuovo=$(curl --no-progress-meter -L $attuale | sed -n 's/.*\(https:\/\/cdn\.streamingcommunity\.[^ ]*images[^ ]*\).*/\1/p' | grep -oP 'streamingcommunity\.\w+(\.\w+)?')
|
|
|
|
|
if [ "$attuale" != "$nuovo" ]; then
|
|
|
|
|
attuale="$nuovo"
|
2025-01-13 18:32:09 +01:00
|
|
|
echo "$attuale" > $PWD_SC/attuale.txt
|
2025-01-13 18:19:28 +01:00
|
|
|
fi
|
2025-01-13 18:52:31 +01:00
|
|
|
|
|
|
|
|
attuale="https://$(cat "$PWD_SC/attuale.txt")"
|
|
|
|
|
|
|
|
|
|
echo -e "\nLink aggiornato:\n$attuale\n"
|