From d4e254738907d295de35b74431d781c854562e3c Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Sun, 9 Feb 2025 14:46:58 +0100 Subject: [PATCH] do some cleanup --- upsnapz.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/upsnapz.sh b/upsnapz.sh index bcf9bae..a6fb4aa 100755 --- a/upsnapz.sh +++ b/upsnapz.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Time-stamp: <2025-02-09 14:40:32 nomad> +# Time-stamp: <2025-02-09 14:45:56 nomad> # # Michel Le Cocq # @@ -58,14 +58,17 @@ function check_ZFS_BOOT_MENU curl -s -o /tmp/sha256.txt -L $PA e=$(grep $(sha256sum /boot/efi/EFI/ZBM/VMLINUZ.EFI | awk '{print $1}') /tmp/sha256.txt | awk -F"[()]" '{print $2}' ) echo -n " Installed Release : " - echo $e | awk -F'-' '{print $4}' + e=$(echo $e | awk -F'-' '{print $4}') + echo $e f=$(gh release list --repo https://github.com/zbm-dev/zfsbootmenu | grep Latest | awk -F' ' '{print $4}') - printf ' Latest Release : ' - echo $f - if [ ! -z $e ] + if [ "$e" != "$f" ] + then + echo " /!\ Installed Release and lastest are not same !"$PA + printf ' Latest Release : ' + echo $f + fi + if [ -z $e ] then - echo " in sync with :" $(echo $PA | awk -F'/' '{print $NF}') - else echo " /!\ not in sync with : "$PA echo ' avaible release :' cat /tmp/sha256.txt | grep EFI | grep release | awk -F"[()]" '{print $2}'