do some cleanup
This commit is contained in:
parent
4fafd17e1c
commit
d4e2547389
17
upsnapz.sh
17
upsnapz.sh
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Time-stamp: <2025-02-09 14:40:32 nomad>
|
# Time-stamp: <2025-02-09 14:45:56 nomad>
|
||||||
#
|
#
|
||||||
# Michel Le Cocq <lecocq@ipgp.fr>
|
# Michel Le Cocq <lecocq@ipgp.fr>
|
||||||
# <nomad@neuronfarm.net>
|
# <nomad@neuronfarm.net>
|
||||||
@ -58,14 +58,17 @@ function check_ZFS_BOOT_MENU
|
|||||||
curl -s -o /tmp/sha256.txt -L $PA
|
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}' )
|
e=$(grep $(sha256sum /boot/efi/EFI/ZBM/VMLINUZ.EFI | awk '{print $1}') /tmp/sha256.txt | awk -F"[()]" '{print $2}' )
|
||||||
echo -n " Installed Release : "
|
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}')
|
f=$(gh release list --repo https://github.com/zbm-dev/zfsbootmenu | grep Latest | awk -F' ' '{print $4}')
|
||||||
printf ' Latest Release : '
|
if [ "$e" != "$f" ]
|
||||||
echo $f
|
then
|
||||||
if [ ! -z $e ]
|
echo " /!\ Installed Release and lastest are not same !"$PA
|
||||||
|
printf ' Latest Release : '
|
||||||
|
echo $f
|
||||||
|
fi
|
||||||
|
if [ -z $e ]
|
||||||
then
|
then
|
||||||
echo " in sync with :" $(echo $PA | awk -F'/' '{print $NF}')
|
|
||||||
else
|
|
||||||
echo " /!\ not in sync with : "$PA
|
echo " /!\ not in sync with : "$PA
|
||||||
echo ' avaible release :'
|
echo ' avaible release :'
|
||||||
cat /tmp/sha256.txt | grep EFI | grep release | awk -F"[()]" '{print $2}'
|
cat /tmp/sha256.txt | grep EFI | grep release | awk -F"[()]" '{print $2}'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user