From cb0ddc04a157d006e3f1ebc9aa7aec85a4be8182 Mon Sep 17 00:00:00 2001 From: Bernhard Landauer Date: Wed, 1 Mar 2017 00:21:21 +0100 Subject: [PATCH 1/5] fix exit function --- lib/util-menu.sh | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/lib/util-menu.sh b/lib/util-menu.sh index c2187b4..191df1a 100644 --- a/lib/util-menu.sh +++ b/lib/util-menu.sh @@ -44,21 +44,7 @@ main_menu_online() { ;; "8") edit_configs ;; - *) final_check - dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --yesno "$_CloseInstBody $(cat ${CHECKLIST})" 0 0 - if [[ $? -eq 0 ]]; then - echo "exit installer." >> ${LOGFILE} - if [[ -e /mnt/usr ]]; then - dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --yesno "\n$_LogInfo\n" 0 0 - if [[ $? -eq 0 ]]; then - [[ -e /mnt/.m-a.log ]] && cat ${LOGFILE} >> /mnt/.m-a.log - cp ${LOGFILE} /mnt/.m-a.log - fi - fi - umount_partitions - clear - exit 0 - fi + *) exit_done ;; esac From dd78a7a616c0508b770acd7c5bb1bc7105046a4f Mon Sep 17 00:00:00 2001 From: Bernhard Landauer Date: Wed, 1 Mar 2017 00:26:16 +0100 Subject: [PATCH 2/5] more changes --- lib/util-desktop.sh | 201 +++++++++++++++++++++----------------------- lib/util.sh | 100 ++++++++++++++-------- 2 files changed, 162 insertions(+), 139 deletions(-) diff --git a/lib/util-desktop.sh b/lib/util-desktop.sh index 753ae56..a056db2 100644 --- a/lib/util-desktop.sh +++ b/lib/util-desktop.sh @@ -67,7 +67,7 @@ install_de_wm() { if [[ $(cat ${PACKAGES}) != "" ]]; then clear basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>$ERR - check_for_error "basestrap ${MOUNTPOINT} $(cat ${PACKAGES})" "$?" + check_for_error "basestrap ${MOUNTPOINT} $(cat ${PACKAGES})" "$?" install_vanilla_de_wm fi fi } @@ -177,14 +177,11 @@ install_manjaro_de_wm() { check_for_error "packages to install: $(grep -v -f /mnt/.base /tmp/.edition | sort | uniq | tr '\n' ' ')" - - - clear # remove already installed base pkgs and # basestrap the parsed package list to the new root basestrap -i ${MOUNTPOINT} $(grep -v -f /mnt/.base /tmp/.edition | sort | uniq) 2>$ERR - check_for_error "install pkgs: $(cat /tmp/.desktop)" "$?" + check_for_error "install pkgs: $(cat /tmp/.desktop)" "$?" install_desktop_menu # copy the profile overlay to the new root echo "Copying overlay files to the new root" @@ -193,7 +190,7 @@ install_manjaro_de_wm() { # Copy settings to root account cp -ar $MOUNTPOINT/etc/skel/. $MOUNTPOINT/root/ 2>$ERR - check_for_error "copy root config" "$?" + check_for_error "copy root config" "$?" install_desktop_menu # copy settings to already created users if [[ -e "$(echo /mnt/home/*)" ]]; then @@ -288,7 +285,7 @@ install_manjaro_de_wm() { if [[ $(cat ${PACKAGES}) != "" ]]; then clear basestrap -i ${MOUNTPOINT} $(cat ${PACKAGES}) 2>$ERR - check_for_error "basestrap -i ${MOUNTPOINT} $(cat ${PACKAGES})" "$?" + check_for_error "basestrap -i ${MOUNTPOINT} $(cat ${PACKAGES})" "$?" install_desktop_menu fi fi } @@ -301,15 +298,9 @@ install_manjaro_de_wm_pkg() { SHOW_ONCE=1 fi clear - # install iso-profiles pkgs as needed - local pkgs=(manjaro-iso-profiles-{base,official,community}) - - for p in ${pkgs[@]}; do - pacman -Sy --noconfirm $p 2>$ERR - check_for_error "update profiles pkgs" $? install_graphics_menu - done + pacman -Sy --noconfirm $p manjaro-iso-profiles-{base,official,community} 2>$ERR + check_for_error "update profiles pkgs" $? install_graphics_menu - install_manjaro_de_wm } install_manjaro_de_wm_git() { @@ -330,8 +321,6 @@ install_manjaro_de_wm_git() { git clone --depth 1 https://github.com/manjaro/iso-profiles.git $PROFILES 2>$ERR check_for_error "clone profiles repo" $? install_graphics_menu fi - - install_manjaro_de_wm } # Display Manager @@ -441,8 +430,7 @@ install_nm() { arch_chroot "systemctl enable $(cat ${PACKAGES})" 2>$ERR fi fi - - check_for_error "$FUNCNAME" "$?" + check_for_error "$FUNCNAME" "$?" install_network_menu NM_ENABLED=1 } @@ -478,6 +466,7 @@ install_nm() { # Where networkmanager selected, add network-manager-applet sed -i 's/NetworkManager/networkmanager network-manager-applet/g' ${PACKAGES} basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>$ERR + check_for_error "$FUNCNAME" "$?" install_network_menu # Where networkmanager selected, now remove network-manager-applet sed -i 's/networkmanager network-manager-applet/NetworkManager/g' ${PACKAGES} @@ -491,100 +480,102 @@ install_nm() { } install_multimedia_menu() { - local PARENT="$FUNCNAME" - - install_alsa_pulse() { - # Prep Variables - echo "" > ${PACKAGES} - ALSA="" - PULSE_EXTRA="" - alsa=$(pacman -Ss alsa | awk '{print $1}' | grep "/alsa-" | sed "s/extra\///g" | sort -u) - pulse_extra=$(pacman -Ss pulseaudio- | awk '{print $1}' | sed "s/extra\///g" | grep "pulseaudio-" | sort -u) - - for i in ${alsa}; do - ALSA="${ALSA} ${i} - off" - done + declare -i loopmenu=1 + while ((loopmenu)); do + local PARENT="$FUNCNAME" + + submenu 5 + DIALOG "$_InstMultMenuBody" --default-item ${HIGHLIGHT_SUB} --menu " $_InstMultMenuTitle " 0 0 5 \ + "1" "$_InstMulSnd" \ + "2" "$_InstMulCodec" \ + "3" "$_InstMulAcc" \ + "4" "$_InstMulCust" \ + "5" "$_Back" 2>${ANSWER} + + HIGHLIGHT_SUB=$(cat ${ANSWER}) + case $(cat ${ANSWER}) in + "1") install_alsa_pulse + ;; + "2") install_codecs + ;; + "3") install_acc_menu + ;; + "4") install_cust_pkgs + ;; + *) loopmenu=0 + ;; + esac + done + install_multimedia_menu +} - ALSA=$(echo $ALSA | sed "s/alsa-utils - off/alsa-utils - on/g" | sed "s/alsa-plugins - off/alsa-plugins - on/g") +install_alsa_pulse() { + # Prep Variables + echo "" > ${PACKAGES} + ALSA="" + PULSE_EXTRA="" + alsa=$(pacman -Ss alsa | awk '{print $1}' | grep "/alsa-" | sed "s/extra\///g" | sort -u) + pulse_extra=$(pacman -Ss pulseaudio- | awk '{print $1}' | sed "s/extra\///g" | grep "pulseaudio-" | sort -u) - for i in ${pulse_extra}; do - PULSE_EXTRA="${PULSE_EXTRA} ${i} - off" - done + for i in ${alsa}; do + ALSA="${ALSA} ${i} - off" + done - DIALOG " $_InstMulSnd " --checklist "$_InstMulSndBody\n\n$_UseSpaceBar" 0 0 6 \ - $ALSA "pulseaudio" "-" off $PULSE_EXTRA \ - "paprefs" "pulseaudio GUI" off \ - "pavucontrol" "pulseaudio GUI" off \ - "ponymix" "pulseaudio CLI" off \ - "volumeicon" "ALSA GUI" off \ - "volwheel" "ASLA GUI" off 2>${PACKAGES} + ALSA=$(echo $ALSA | sed "s/alsa-utils - off/alsa-utils - on/g" | sed "s/alsa-plugins - off/alsa-plugins - on/g") - clear - # If at least one package, install. - if [[ $(cat ${PACKAGES}) != "" ]]; then - basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>$ERR - check_for_error "$FUNCNAME" "$?" - fi - } + for i in ${pulse_extra}; do + PULSE_EXTRA="${PULSE_EXTRA} ${i} - off" + done - install_codecs() { - # Prep Variables - echo "" > ${PACKAGES} - GSTREAMER="" - gstreamer=$(pacman -Ss gstreamer | awk '{print $1}' | grep "/gstreamer" | sed "s/extra\///g" | sed "s/community\///g" | sort -u) - echo $gstreamer - for i in ${gstreamer}; do - GSTREAMER="${GSTREAMER} ${i} - off" - done + DIALOG " $_InstMulSnd " --checklist "$_InstMulSndBody\n\n$_UseSpaceBar" 0 0 6 \ + $ALSA "pulseaudio" "-" off $PULSE_EXTRA \ + "paprefs" "pulseaudio GUI" off \ + "pavucontrol" "pulseaudio GUI" off \ + "ponymix" "pulseaudio CLI" off \ + "volumeicon" "ALSA GUI" off \ + "volwheel" "ASLA GUI" off 2>${PACKAGES} - DIALOG " $_InstMulCodec " --checklist "$_InstMulCodBody\n\n$_UseSpaceBar" 0 0 14 \ - $GSTREAMER "xine-lib" "-" off 2>${PACKAGES} + clear + # If at least one package, install. + if [[ $(cat ${PACKAGES}) != "" ]]; then + basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>$ERR + check_for_error "$FUNCNAME" "$?" install_multimedia_menu + fi +} - clear - # If at least one package, install. - if [[ $(cat ${PACKAGES}) != "" ]]; then - basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>$ERR - check_for_error "$FUNCNAME" "$?" - fi - } +install_codecs() { + # Prep Variables + echo "" > ${PACKAGES} + GSTREAMER="" + gstreamer=$(pacman -Ss gstreamer | awk '{print $1}' | grep "/gstreamer" | sed "s/extra\///g" | sed "s/community\///g" | sort -u) + echo $gstreamer + for i in ${gstreamer}; do + GSTREAMER="${GSTREAMER} ${i} - off" + done - install_cust_pkgs() { - echo "" > ${PACKAGES} - DIALOG " $_InstMulCust " --inputbox "$_InstMulCustBody" 0 0 "" 2>${PACKAGES} || install_multimedia_menu + DIALOG " $_InstMulCodec " --checklist "$_InstMulCodBody\n\n$_UseSpaceBar" 0 0 14 \ + $GSTREAMER "xine-lib" "-" off 2>${PACKAGES} - clear - # If at least one package, install. - if [[ $(cat ${PACKAGES}) != "" ]]; then - if [[ $(cat ${PACKAGES}) == "hen poem" ]]; then - DIALOG " \"My Sweet Buckies\" by Atiya & Carl " --msgbox "\nMy Sweet Buckies,\nYou are the sweetest Buckies that ever did \"buck\",\nLily, Rosie, Trumpet, and Flute,\nMy love for you all is absolute!\n\nThey buck: \"We love our treats, we are the Booyakka sisters,\"\n\"Sometimes we squabble and give each other comb-twisters,\"\n\"And in our garden we love to sunbathe, forage, hop and jump,\"\n\"We love our freedom far, far away from that factory farm dump,\"\n\n\"For so long we were trapped in cramped prisons full of disease,\"\n\"No sunlight, no fresh air, no one who cared for even our basic needs,\"\n\"We suffered in fear, pain, and misery for such a long time,\"\n\"But now we are so happy, we wanted to tell you in this rhyme!\"\n\n" 0 0 - else - basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>$ERR - check_for_error "$FUNCNAME $(cat ${PACKAGES})" "$?" - fi - fi - } + clear + # If at least one package, install. + if [[ $(cat ${PACKAGES}) != "" ]]; then + basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>$ERR + check_for_error "$FUNCNAME" "$?" install_multimedia_menu + fi +} - submenu 5 - DIALOG "$_InstMultMenuBody" --default-item ${HIGHLIGHT_SUB} --menu " $_InstMultMenuTitle " 0 0 5 \ - "1" "$_InstMulSnd" \ - "2" "$_InstMulCodec" \ - "3" "$_InstMulAcc" \ - "4" "$_InstMulCust" \ - "5" "$_Back" 2>${ANSWER} - - HIGHLIGHT_SUB=$(cat ${ANSWER}) - case $(cat ${ANSWER}) in - "1") install_alsa_pulse - ;; - "2") install_codecs - ;; - "3") install_acc_menu - ;; - "4") install_cust_pkgs - ;; - *) main_menu_online - ;; - esac +install_cust_pkgs() { + echo "" > ${PACKAGES} + DIALOG " $_InstMulCust " --inputbox "$_InstMulCustBody" 0 0 "" 2>${PACKAGES} || install_multimedia_menu - install_multimedia_menu -} + clear + # If at least one package, install. + if [[ $(cat ${PACKAGES}) != "" ]]; then + if [[ $(cat ${PACKAGES}) == "hen poem" ]]; then + DIALOG " \"My Sweet Buckies\" by Atiya & Carl " --msgbox "\nMy Sweet Buckies,\nYou are the sweetest Buckies that ever did \"buck\",\nLily, Rosie, Trumpet, and Flute,\nMy love for you all is absolute!\n\nThey buck: \"We love our treats, we are the Booyakka sisters,\"\n\"Sometimes we squabble and give each other comb-twisters,\"\n\"And in our garden we love to sunbathe, forage, hop and jump,\"\n\"We love our freedom far, far away from that factory farm dump,\"\n\n\"For so long we were trapped in cramped prisons full of disease,\"\n\"No sunlight, no fresh air, no one who cared for even our basic needs,\"\n\"We suffered in fear, pain, and misery for such a long time,\"\n\"But now we are so happy, we wanted to tell you in this rhyme!\"\n\n" 0 0 + else + basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>$ERR + check_for_error "$FUNCNAME $(cat ${PACKAGES})" "$?" install_multimedia_menu + fi + fi +} \ No newline at end of file diff --git a/lib/util.sh b/lib/util.sh index 74c99d5..61fede7 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -106,7 +106,8 @@ submenu() { if [[ $SUB_MENU != "$PARENT" ]]; then SUB_MENU="$PARENT" HIGHLIGHT_SUB=1 - elif [[ $HIGHLIGHT_SUB != "$1" ]]; then + fi + if [[ $HIGHLIGHT_SUB != "$1" ]]; then HIGHLIGHT_SUB=$(( HIGHLIGHT_SUB + 1 )) fi } @@ -157,7 +158,7 @@ id_system() { check_for_error() { local _msg="$1" local _err="${2:-0}" - local _function_menu="${3:-main_menu_online}" + local _function_menu="${3:-main_menu}" ((${_err}!=0)) && _msg="[${_msg}][${_err}]" [[ -f "${ERR}" ]] && { _msg="${_msg} $(head -n1 ${ERR})" @@ -169,8 +170,9 @@ check_for_error() { _fpath=" --${_fpath// /()<-}" echo -e "$(date +%D\ %T) ERROR ${_msg} ${_fpath}" >> "${LOGFILE}" if [[ "${_function_menu}" != "SKIP" ]]; then - DIALOG " $_ErrTitle " --msgbox "\n${_msg}\n" 0 0 - ($_function_menu) + DIALOG " $_ErrTitle " --msgbox "\n${_msg}\n" 0 0 + loopmenu=0 # ?? + ($_function_menu) fi else echo -e "$(date +%D\ %T) ${_msg}" >> "${LOGFILE}" @@ -291,7 +293,8 @@ check_requirements() { sleep 2 clear echo "" > $ERR - pacman -Syy + pacman -Syy 2>$ERR + check_for_error "refresh database" $? 'SKIP' } # Greet the user when first starting the installer @@ -299,6 +302,35 @@ greeting() { DIALOG " $_WelTitle $VERSION " --msgbox "$_WelBody" 0 0 } +# Originally adapted from AIS. Added option to allow users to edit the mirrorlist. +configure_mirrorlist() { + declare -i loopmenu=1 + while ((loopmenu)); do + DIALOG " $_MirrorlistTitle " \ + --menu "$_MirrorlistBody" 0 0 4 \ + "1" "$_MirrorRankTitle" \ + "2" "$_MirrorConfig" \ + "3" "$_MirrorPacman" \ + "4" "$_Back" 2>${ANSWER} + + case $(cat ${ANSWER}) in + "1") rank_mirrors + ;; + "2") nano /etc/pacman-mirrors.conf + check_for_error "edit pacman-mirrors.conf" + ;; + "3") nano /etc/pacman.conf + DIALOG " $_MirrorPacman " --yesno "$_MIrrorPacQ" 0 0 && COPY_PACCONF=1 || COPY_PACCONF=0 + check_for_error "edit pacman.conf $COPY_PACCONF" + pacman -Syy + ;; + *) loopmenu=0 + ;; + esac + done + install_base_menu +} + rank_mirrors() { #Choose the branch for mirrorlist BRANCH="/tmp/.branch" @@ -313,33 +345,6 @@ rank_mirrors() { } } -# Originally adapted from AIS. Added option to allow users to edit the mirrorlist. -configure_mirrorlist() { - DIALOG " $_MirrorlistTitle " \ - --menu "$_MirrorlistBody" 0 0 4 \ - "1" "$_MirrorRankTitle" \ - "2" "$_MirrorConfig" \ - "3" "$_MirrorPacman" \ - "4" "$_Back" 2>${ANSWER} - - case $(cat ${ANSWER}) in - "1") rank_mirrors - ;; - "2") nano /etc/pacman-mirrors.conf - check_for_error "edit pacman-mirrors.conf" - ;; - "3") nano /etc/pacman.conf - DIALOG " $_MirrorPacman " --yesno "$_MIrrorPacQ" 0 0 && COPY_PACCONF=1 || COPY_PACCONF=0 - check_for_error "edit pacman.conf $COPY_PACCONF" - pacman -Syy - ;; - *) install_base_menu - ;; - esac - - configure_mirrorlist -} - # Simple code to show devices / partitions. show_devices() { lsblk -o NAME,MODEL,TYPE,FSTYPE,SIZE,MOUNTPOINT | grep "disk\|part\|lvm\|crypt\|NAME\|MODEL\|TYPE\|FSTYPE\|SIZE\|MOUNTPOINT" > /tmp/.devlist @@ -355,7 +360,6 @@ arch_chroot() { check_mount() { if [[ $(lsblk -o MOUNTPOINT | grep ${MOUNTPOINT}) == "" ]]; then DIALOG " $_ErrTitle " --msgbox "$_ErrNoMount" 0 0 - main_menu_online fi } @@ -363,7 +367,6 @@ check_mount() { check_base() { if [[ ! -e /mnt/.base_installed ]]; then DIALOG " $_ErrTitle " --msgbox "$_ErrNoBase" 0 0 - install_base_menu fi } @@ -429,3 +432,32 @@ final_check() { # check if user account has been generated [[ $(ls /mnt/home) == "" ]] && echo "- No user accounts have been generated" >> ${CHECKLIST} } + +exit_done() { + if [[ $(lsblk -o MOUNTPOINT | grep ${MOUNTPOINT}) != "" ]]; then + final_check + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --yesno "$_CloseInstBody $(cat ${CHECKLIST})" 0 0 + if [[ $? -eq 0 ]]; then + echo "exit installer." >> ${LOGFILE} + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --yesno "\n$_LogInfo\n" 0 0 + if [[ $? -eq 0 ]]; then + [[ -e /mnt/.m-a.log ]] && cat ${LOGFILE} >> /mnt/.m-a.log + cp ${LOGFILE} /mnt/.m-a.log + fi + umount_partitions + clear + loopmenu=0 + else + main_menu + fi + else + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --yesno "$_CloseInstBody" 0 0 + if [[ $? -eq 0 ]]; then + umount_partitions + clear + loopmenu=0 + else + main_menu + fi + fi +} From 130ccc6614740a5bf11fc6f9bde283aaf27ceccb Mon Sep 17 00:00:00 2001 From: Bernhard Landauer Date: Wed, 1 Mar 2017 00:33:33 +0100 Subject: [PATCH 3/5] missing EOF --- lib/util-desktop.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util-desktop.sh b/lib/util-desktop.sh index a056db2..74502b0 100644 --- a/lib/util-desktop.sh +++ b/lib/util-desktop.sh @@ -578,4 +578,4 @@ install_cust_pkgs() { check_for_error "$FUNCNAME $(cat ${PACKAGES})" "$?" install_multimedia_menu fi fi -} \ No newline at end of file +} From a077d7362eacd69db323e1f72fa80c09ba5c728f Mon Sep 17 00:00:00 2001 From: Bernhard Landauer Date: Wed, 1 Mar 2017 00:46:15 +0100 Subject: [PATCH 4/5] new main_menu() --- lib/util-menu.sh | 97 ++++++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 48 deletions(-) diff --git a/lib/util-menu.sh b/lib/util-menu.sh index 191df1a..ffc4635 100644 --- a/lib/util-menu.sh +++ b/lib/util-menu.sh @@ -1,54 +1,55 @@ -main_menu_online() { - if [[ $HIGHLIGHT != 9 ]]; then - HIGHLIGHT=$(( HIGHLIGHT + 1 )) - fi - - DIALOG " $_MMTitle " --default-item ${HIGHLIGHT} \ - --menu "$_MMBody" 0 0 9 \ - "1" "$_PrepMenuTitle|>" \ - "2" "$_InstBsMenuTitle|>" \ - "3" "$_InstGrMenuTitle|>" \ - "4" "$_ConfBseMenuTitle|>" \ - "5" "$_InstNMMenuTitle|>" \ - "6" "$_InstMultMenuTitle|>" \ - "7" "$_SecMenuTitle|>" \ - "8" "$_SeeConfOptTitle|>" \ - "9" "$_Done" 2>${ANSWER} - - HIGHLIGHT=$(cat ${ANSWER}) - - # Depending on the answer, first check whether partition(s) are mounted and whether base has been installed - if [[ $(cat ${ANSWER}) -eq 2 ]]; then - check_mount - fi +main_menu() { + declare -i loopmenu=1 + while ((loopmenu)); do + if [[ $HIGHLIGHT != 9 ]]; then + HIGHLIGHT=$(( HIGHLIGHT + 1 )) + fi - if [[ $(cat ${ANSWER}) -ge 3 ]] && [[ $(cat ${ANSWER}) -le 8 ]]; then - check_mount - check_base - fi + DIALOG " $_MMTitle " --default-item ${HIGHLIGHT} \ + --menu "$_MMBody" 0 0 9 \ + "1" "$_PrepMenuTitle|>" \ + "2" "$_InstBsMenuTitle|>" \ + "3" "$_ConfBseMenuTitle|>" \ + "4" "$_InstGrMenuTitle|>" \ + "5" "$_InstNMMenuTitle|>" \ + "6" "$_InstMultMenuTitle|>" \ + "7" "$_SecMenuTitle|>" \ + "8" "$_SeeConfOptTitle|>" \ + "9" "$_Done" 2>${ANSWER} + + HIGHLIGHT=$(cat ${ANSWER}) + + # Depending on the answer, first check whether partition(s) are mounted and whether base has been installed + if [[ $(cat ${ANSWER}) -eq 2 ]]; then + check_mount + fi - case $(cat ${ANSWER}) in - "1") prep_menu - ;; - "2") install_base_menu - ;; - "3") install_graphics_menu - ;; - "4") config_base_menu - ;; - "5") install_network_menu - ;; - "6") install_multimedia_menu - ;; - "7") security_menu - ;; - "8") edit_configs - ;; - *) exit_done - ;; - esac + if [[ $(cat ${ANSWER}) -ge 3 ]] && [[ $(cat ${ANSWER}) -le 8 ]]; then + check_mount + check_base + fi - main_menu_online + case $(cat ${ANSWER}) in + "1") prep_menu + ;; + "2") install_base_menu + ;; + "3") config_base_menu + ;; + "4") install_graphics_menu + ;; + "5") install_network_menu + ;; + "6") install_multimedia_menu + ;; + "7") security_menu + ;; + "8") edit_configs + ;; + *) exit_done + ;; + esac + done } # Preparation From 48de4863c71562ea9da68ceb01fd77b862b583dd Mon Sep 17 00:00:00 2001 From: Bernhard Landauer Date: Wed, 1 Mar 2017 00:48:40 +0100 Subject: [PATCH 5/5] rm empty line --- lib/util-desktop.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/util-desktop.sh b/lib/util-desktop.sh index 74502b0..735c6b7 100644 --- a/lib/util-desktop.sh +++ b/lib/util-desktop.sh @@ -300,7 +300,6 @@ install_manjaro_de_wm_pkg() { clear pacman -Sy --noconfirm $p manjaro-iso-profiles-{base,official,community} 2>$ERR check_for_error "update profiles pkgs" $? install_graphics_menu - } install_manjaro_de_wm_git() {