rss generator update
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# SETTARE QUESTA VARIABILE CON IL PERCORSO GIUSTO:
|
||||
# Es: PWD_SC="/var/www/html/streamingcommunity"
|
||||
PWD_SC="$PWD"
|
||||
|
||||
# Se il link è stato aggiornato, aggiorna il file "attuale.txt"
|
||||
# Se il link è cambiato, allora aggiorna il file "attuale.txt"
|
||||
attuale="$(cat "$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+)?')
|
||||
if [ "$attuale" != "$nuovo" ]; then
|
||||
@@ -13,7 +14,7 @@ fi
|
||||
|
||||
# Formatta il link e lo stampa
|
||||
formatted="https://$(cat "$PWD_SC/attuale.txt")"
|
||||
echo "$formatted" #per debug
|
||||
echo "$formatted"
|
||||
|
||||
# Crea pagina "index.html"
|
||||
cat <<- _EOF > $PWD_SC/index.html
|
||||
|
||||
Reference in New Issue
Block a user