show correct options in manage archboot menu

This commit is contained in:
Tobias Powalowski 2023-07-20 10:21:59 +02:00
parent 5c58dd9f29
commit 545822746f
2 changed files with 4 additions and 13 deletions

View file

@ -15,8 +15,8 @@ _check_desktop() {
_check_manage() { _check_manage() {
_MANAGE=() _MANAGE=()
update | grep -q full && _MANAGE+=( "FULL" "Switch To Full Arch Linux System" ) update | grep -q full && _MANAGE+=( "FULL" "Switch To Full Arch Linux System" )
update | grep -q latest && _MANAGE+=( "UPDATE" "Update Archboot Environment" ) update | grep -q 'latest archboot' && _MANAGE+=( "UPDATE" "Update Archboot Environment" )
update | grep -q image && _MANAGE+=( "IMAGE" "Create New Archboot Images" ) update | grep -q image && _MANAGE+=( "IMAGE" "Create Archboot Images" )
} }
_desktop () { _desktop () {

View file

@ -196,18 +196,9 @@ if [[ -e /usr/bin/setup ]]; then
if [[ ! -e /.pacsetup ]]; then if [[ ! -e /.pacsetup ]]; then
pacsetup pacsetup
fi fi
# switch for setup or launcher
if [[ -e "${_CACHEDIR}/archboot.db" ]]; then
if [[ ! -e /tmp/.setup ]]; then
# run setup on local medium once!
setup
fi
else
# run launcher on latest/normal medium once!
if [[ ! -e /.launcher ]]; then if [[ ! -e /.launcher ]]; then
launcher launcher
fi fi
fi
# latest image, fail if less than 2GB RAM available # latest image, fail if less than 2GB RAM available
elif [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 1970000 ]]; then elif [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 1970000 ]]; then
_welcome _welcome