fix goarchive
This commit is contained in:
parent
53bdc127e8
commit
74a9180dc6
1 changed files with 4 additions and 18 deletions
22
functions.sh
22
functions.sh
|
@ -1429,8 +1429,9 @@ EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
function goarchive () {
|
function goarchive () {
|
||||||
|
local SHOPTEXTGLOB="$(shopt -p |grep extglob)"
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
if [ "{#:-0}" -gt 0 ]
|
if [ "${#:-0}" -gt 0 ]
|
||||||
then
|
then
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h)
|
-h)
|
||||||
|
@ -1462,23 +1463,8 @@ EOF
|
||||||
else
|
else
|
||||||
[ -e "$(xdg-user-dir ARCHIVE)" ] && cd "$(xdg-user-dir ARCHIVE)"
|
[ -e "$(xdg-user-dir ARCHIVE)" ] && cd "$(xdg-user-dir ARCHIVE)"
|
||||||
fi
|
fi
|
||||||
shopt -u extglob
|
# shopt -u extglob
|
||||||
}
|
eval $SHOPTEXTGLOB
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#EOF
|
#EOF
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue