mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
checks optimized
This commit is contained in:
parent
84512bcab5
commit
a57d52f021
2 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
_run_latest_install
|
||||
else
|
||||
# local image
|
||||
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
|
||||
fi
|
||||
# latest image
|
||||
else
|
||||
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 2571000 ]]; then
|
||||
_run_latest
|
||||
|
|
|
@ -56,12 +56,11 @@ usage () {
|
|||
fi
|
||||
else
|
||||
# latest image
|
||||
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 1970000 &&\
|
||||
"$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 3277000 ]]; then
|
||||
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 1970000 ]]; then
|
||||
echo -e " \033[1m-latest\033[0m Launch latest archboot environment (using kexec)."
|
||||
echo ""
|
||||
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
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue