From 74a9180dc60506687af61a0bc1ed74658525a7e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Wed, 17 Apr 2024 16:25:41 +0200 Subject: [PATCH] fix goarchive --- functions.sh | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/functions.sh b/functions.sh index 44e2b0e..9d8cef9 100755 --- a/functions.sh +++ b/functions.sh @@ -1429,8 +1429,9 @@ EOF } function goarchive () { + local SHOPTEXTGLOB="$(shopt -p |grep extglob)" shopt -s extglob - if [ "{#:-0}" -gt 0 ] + if [ "${#:-0}" -gt 0 ] then case "$1" in -h) @@ -1462,23 +1463,8 @@ EOF else [ -e "$(xdg-user-dir ARCHIVE)" ] && cd "$(xdg-user-dir ARCHIVE)" fi - shopt -u extglob -} - -checkkernel () { -for i in /vmlinuz /boot/vmlinuz -do - [ -e "${i}" ] || continue - if [ $(basename $(readlink -f "${i}")) = vmlinuz-$(uname -r) ] - then - printf "%s\n" "Kein Upgrade notwendig. Kernel aktuell" - else - printf "%s\n" "Reboot notwendig!!" - res=1 - fi - return ${res:-0} -done - +# shopt -u extglob + eval $SHOPTEXTGLOB } #EOF