From 59e135063ae3b64c617249cfd725bab37f0e05e3 Mon Sep 17 00:00:00 2001 From: scossa Date: Mon, 13 Jan 2025 18:54:47 +0100 Subject: [PATCH] up --- script_link.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script_link.sh b/script_link.sh index a18f2d7..c0e2ec5 100755 --- a/script_link.sh +++ b/script_link.sh @@ -1,7 +1,9 @@ #!/bin/bash +# SETTARE QUESTA VARIABILE SE LO SCRIPT NON VIENE USATO IN LOCALE: PWD_SC="$PWD" +# Se il link รจ stato aggiornato, aggiorna il file "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+)?') if [ "$attuale" != "$nuovo" ]; then @@ -9,6 +11,6 @@ if [ "$attuale" != "$nuovo" ]; then echo "$attuale" > $PWD_SC/attuale.txt fi +# Formatta il link e lo stampa attuale="https://$(cat "$PWD_SC/attuale.txt")" - echo -e "\nLink aggiornato:\n$attuale\n" \ No newline at end of file