From 5352a68178fb4eb759230cb62fa06d6835c79b43 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Thu, 1 Jul 2021 02:09:12 -0400 Subject: [PATCH] make news more compatible with other distros. --- audiogame-manager.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index c2964cc..00dce4d 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -49,10 +49,11 @@ export DIALOGOPTS='--no-lines --visit-items' # Check for latest news check_news() { + trap return INT # url for news file local newsFile="https://stormgames.wolfe.casa/media/agm.ogg" local newsPath="${configFile%/*.conf}/.news" - local newsTag="$(curl --connect-timeout 15 -sI "$newsFile" | grep 'etag: "' | cut -d '"' -f2)" + local newsTag="$(curl --connect-timeout 5 -sI "$newsFile" | grep -i '^etag: "' | cut -d '"' -f2)" local newsOldTag="$(cat "$newsPath" 2> /dev/null)" if [[ "$newsTag" != "$newsOldTag" ]]; then dialog --yes-label 'Play' \