From 5a642fd38a394b00d3a1362ed07753bda9141283 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 22 Jul 2020 15:51:31 +0200 Subject: Update --- .local/bin/system-upgrade | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.local/bin/system-upgrade b/.local/bin/system-upgrade index 2391947..bbf9363 100755 --- a/.local/bin/system-upgrade +++ b/.local/bin/system-upgrade @@ -43,9 +43,15 @@ EOF' } sub fbsd_update { - my $out; + my $output; + print ' ++----------------+ +| | +| FreeBSD update | +| | ++----------------+' . "\n\n"; user_shell(NOTIFY_PATH . ' "Fetching" "Fetching FreeBSD updates"'); - user_shell(ESPEAK_PATH . ' "Fetching FreeBSD updates" &'); + user_shell(ESPEAK_PATH . ' "Initializing. Fetching FreeBSD updates" &'); open( PS, DASH_PATH . ' -c "' . @@ -53,9 +59,14 @@ sub fbsd_update { ); while (my $read = ) { print $read; - $out .= $read; + $output .= $read; } close(PS); + if (!($output =~ m/No updates needed/)) { + user_shell(NOTIFY_PATH . ' "Installing" "Installing FreeBSD updates"'); + user_shell(ESPEAK_PATH . ' "Installing FreeBSD updates" &'); + root_shell(FREEBSD_UPDATE_PATH . ' install'); + } return; } -- cgit v1.2.3