From f672fc2a7bf499235bac5d0bab61952d6e5545d7 Mon Sep 17 00:00:00 2001 From: Botspot Date: Thu, 9 Sep 2021 15:27:57 -0500 Subject: [PATCH] Slight simplification to message of the day --- gui | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gui b/gui index eafdadf..70735e1 100755 --- a/gui +++ b/gui @@ -171,11 +171,9 @@ uninstall() { #Determine message of the day. If announcements file missing or over a day old, download it. if [ ! -f "${DIRECTORY}/data/announcements" ] || [ ! -z "$(find "${DIRECTORY}/data/announcements" -mtime +1 -print)" ]; then wget https://raw.githubusercontent.com/Botspot/pi-apps-announcements/main/message -qO "${DIRECTORY}/data/announcements" - motd="$(cat "${DIRECTORY}/data/announcements")" -else - motd="$(cat "${DIRECTORY}/data/announcements")" fi -motd="$(echo -e "$motd" | shuf -n 1)" +#retrieve a random line from the announcements file for this session +motd="$(shuf -n 1 "${DIRECTORY}/data/announcements")" #app list mode. Allowed values: 'yad', 'xlunch' guimode="$(cat "${DIRECTORY}/data/settings/App List Style")"