diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-22 15:51:31 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-22 15:51:31 +0200 |
commit | 5a642fd38a394b00d3a1362ed07753bda9141283 (patch) | |
tree | 530666f25b773febafce7ba0e47803a7f74c1fe6 /.local | |
parent | Decent start (diff) | |
download | dotfiles-bsd-5a642fd38a394b00d3a1362ed07753bda9141283.tar.gz dotfiles-bsd-5a642fd38a394b00d3a1362ed07753bda9141283.tar.bz2 dotfiles-bsd-5a642fd38a394b00d3a1362ed07753bda9141283.tar.xz dotfiles-bsd-5a642fd38a394b00d3a1362ed07753bda9141283.tar.zst dotfiles-bsd-5a642fd38a394b00d3a1362ed07753bda9141283.zip |
Update
Diffstat (limited to '')
-rwxr-xr-x | .local/bin/system-upgrade | 17 |
1 files 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 = <PS>) { 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; } |