up
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# SETTARE QUESTA VARIABILE SE LO SCRIPT NON VIENE USATO IN LOCALE:
|
||||||
PWD_SC="$PWD"
|
PWD_SC="$PWD"
|
||||||
|
|
||||||
|
# Se il link è stato aggiornato, aggiorna il file "attuale.txt"
|
||||||
attuale=$(<$PWD_SC/attuale.txt)
|
attuale=$(<$PWD_SC/attuale.txt)
|
||||||
nuovo=$(curl --no-progress-meter -L $attuale | sed -n 's/.*\(https:\/\/cdn\.streamingcommunity\.[^ ]*images[^ ]*\).*/\1/p' | grep -oP 'streamingcommunity\.\w+(\.\w+)?')
|
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
|
if [ "$attuale" != "$nuovo" ]; then
|
||||||
@@ -9,6 +11,6 @@ if [ "$attuale" != "$nuovo" ]; then
|
|||||||
echo "$attuale" > $PWD_SC/attuale.txt
|
echo "$attuale" > $PWD_SC/attuale.txt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Formatta il link e lo stampa
|
||||||
attuale="https://$(cat "$PWD_SC/attuale.txt")"
|
attuale="https://$(cat "$PWD_SC/attuale.txt")"
|
||||||
|
|
||||||
echo -e "\nLink aggiornato:\n$attuale\n"
|
echo -e "\nLink aggiornato:\n$attuale\n"
|
||||||
Reference in New Issue
Block a user