move check_mount/base to functions rather then menus

- makes more sense if menus are supposed to be flexible
This commit is contained in:
Bernhard Landauer 2017-03-10 14:55:06 +01:00
parent 5ef75e7a37
commit 48ab6b425b
3 changed files with 15 additions and 7 deletions

View File

@ -11,6 +11,7 @@
# or modify it as you wish.
install_manjaro_de_wm_git() {
check_base
PROFILES="$DATADIR/profiles"
# Only show this information box once
if [[ $SHOW_ONCE -eq 0 ]]; then
@ -33,6 +34,7 @@ install_manjaro_de_wm_git() {
}
install_vanilla_de_wm() {
check_base
local PARENT="$FUNCNAME"
declare -i loopmenu=1
while ((loopmenu)); do
@ -536,6 +538,7 @@ install_cust_pkgs() {
}
security_menu() {
check_base
declare -i loopmenu=1
while ((loopmenu)); do
local PARENT="$FUNCNAME"

View File

@ -99,6 +99,7 @@ set_xkbmap() {
}
install_manjaro_de_wm_pkg() {
check_base
PROFILES="/usr/share/manjaro-tools/iso-profiles"
# Only show this information box once
if [[ $SHOW_ONCE -eq 0 ]]; then

View File

@ -30,11 +30,11 @@ main_menu() {
case $(cat ${ANSWER}) in
"1") prep_menu
;;
"2") check_mount && install_base_menu
"2") install_base_menu
;;
"3") check_base && config_base_menu
"3") config_base_menu
;;
"4") check_base && edit_configs
"4") edit_configs
;;
"5") check_base && {
import ${LIBDIR}/util-advanced.sh
@ -89,6 +89,7 @@ prep_menu() {
# Base Installation
install_base_menu() {
check_mount
local PARENT="$FUNCNAME"
declare -i loopmenu=1
while ((loopmenu)); do
@ -121,7 +122,7 @@ install_base_menu() {
;;
"4") install_manjaro_de_wm_pkg
;;
"5") check_base && install_drivers_menu
"5") install_drivers_menu
;;
"6") install_bootloader
;;
@ -134,6 +135,7 @@ install_base_menu() {
# Base Configuration
config_base_menu() {
check_base
local PARENT="$FUNCNAME"
declare -i loopmenu=1
while ((loopmenu)); do
@ -198,6 +200,7 @@ install_graphics_menu() {
}
install_drivers_menu() {
check_base
local PARENT="$FUNCNAME"
declare -i loopmenu=1
while ((loopmenu)); do
@ -228,6 +231,7 @@ install_drivers_menu() {
done
}
edit_configs() {
check_base
declare -i loopmenu=1
while ((loopmenu)); do
local PARENT="$FUNCNAME"
@ -322,11 +326,11 @@ advanced_menu() {
HIGHLIGHT_SUB=$(cat ${ANSWER})
case $(cat ${ANSWER}) in
"1") check_base && install_manjaro_de_wm_git
"1") install_manjaro_de_wm_git
;;
"2") check_base && install_vanilla_de_wm
"2") install_vanilla_de_wm
;;
"3") check_base && security_menu
"3") security_menu
;;
*) loopmenu=0
return 0