From c8b33ba92ca8d27d97a9c72af7e59ef0222ebe8c Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 30 Jan 2019 16:03:13 -0600 Subject: [PATCH] Update linupx-scripts.sh --- linupx-scripts.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/linupx-scripts.sh b/linupx-scripts.sh index bff162f..e3d76eb 100755 --- a/linupx-scripts.sh +++ b/linupx-scripts.sh @@ -334,8 +334,13 @@ FW_INSTALL() { } SCRIPT_MENU() { - LASTRUND=$(stat -c %y ${FOLDER}/lastrun | cut -d ' ' -f1) - LASTRUNT=$((stat -c %y ${FOLDER}/lastrun | cut -d ' ' -f2) | cut -d '.' -f1) + if [ -f ${FOLDER}/lastrun ]; then + LASTRUND=$(stat -c %y ${FOLDER}/lastrun | cut -d ' ' -f1) + LASTRUNT=$((stat -c %y ${FOLDER}/lastrun | cut -d ' ' -f2) | cut -d '.' -f1) + else + LASTRUND='never' + LASTRUNT='' + fi while : do #clear