checks optimized

This commit is contained in:
Tobias Powalowski 2022-06-04 20:25:38 +02:00
parent 84512bcab5
commit a57d52f021
2 changed files with 5 additions and 4 deletions

View file

@ -49,10 +49,12 @@ _run_update_installer() {
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3860000 ]]; then if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3860000 ]]; then
_run_latest_install _run_latest_install
else else
# local image
if [[ -e /var/cache/pacman/archboot.db ]]; then if [[ -e /var/cache/pacman/archboot.db ]]; then
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 3860000 ]]; then if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3277000 ]]; then
_run_latest_install _run_latest_install
fi fi
# latest image
else else
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 2571000 ]]; then if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 2571000 ]]; then
_run_latest _run_latest

View file

@ -56,12 +56,11 @@ usage () {
fi fi
else else
# latest image # latest image
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 1970000 &&\ if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 1970000 ]]; then
"$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 3277000 ]]; then
echo -e " \033[1m-latest\033[0m Launch latest archboot environment (using kexec)." echo -e " \033[1m-latest\033[0m Launch latest archboot environment (using kexec)."
echo "" echo ""
fi fi
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 2560000 ]]; then if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 2571000 ]]; then
_latest_install _latest_install
fi fi
fi fi