diff --git a/Makefile b/Makefile index 2d77bcf..1f07014 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ DATADIR = /share/manjaro-architect BIN = \ bin/btrfs-subvol-functions \ + bin/check-translate.in \ bin/ma-launcher \ bin/manjaro-architect @@ -14,7 +15,8 @@ LIBS = \ lib/util-base.sh \ lib/util-desktop.sh \ lib/util-disk.sh \ - lib/util-menu.sh + lib/util-menu.sh \ + lib/util-menu-full.sh LISTS = \ data/package-lists/base-openrc-manjaro \ diff --git a/bin/btrfs-subvol-functions.in b/bin/btrfs-subvol-functions.in index 158e227..e66d448 100644 --- a/bin/btrfs-subvol-functions.in +++ b/bin/btrfs-subvol-functions.in @@ -1,3 +1,15 @@ +# !/bin/bash +# +# Architect Installation Framework (2016-2017) +# +# Written by Carl Duff and @mandog for Archlinux +# Heavily modified and re-written by @Chrysostomus to install Manjaro instead +# Contributors: @papajoker, @oberon and the Manjaro-Community. +# +# This program is free software, provided under the GNU General Public License +# as published by the Free Software Foundation. So feel free to copy, distribute, +# or modify it as you wish. + # scan and update btrfs devices btrfs_scan(){ btrfs device scan >/dev/null 2>&1 diff --git a/bin/check-translate.in b/bin/check-translate.in new file mode 100755 index 0000000..f5e7169 --- /dev/null +++ b/bin/check-translate.in @@ -0,0 +1,26 @@ +# !/bin/bash +# +# Architect Installation Framework (2016-2017) +# +# Written by Carl Duff and @mandog for Archlinux +# Heavily modified and re-written by @Chrysostomus to install Manjaro instead +# Contributors: @papajoker, @oberon and the Manjaro-Community. +# +# This program is free software, provided under the GNU General Public License +# as published by the Free Software Foundation. So feel free to copy, distribute, +# or modify it as you wish. + +fns=($(awk -F'=' '/^_/ {print $1}' "../data/translations/english.trans")) + +for lg in ../data/translations/*.trans ; do + trans=$(<"${lg}") + not=$(echo "${trans}" | grep -cE "#.*translate me") + echo -e "\n-- $(basename "${lg}") ${not} to translate --" + for key in "${fns[@]}"; do + if [[ ! $trans =~ $key ]]; then + echo -e "\t${key} not exist" + fi + done +done + +#echo -e "${fns[*]}" \ No newline at end of file diff --git a/bin/check-translate.sh b/bin/check-translate.sh deleted file mode 100755 index d590571..0000000 --- a/bin/check-translate.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/bash - -fns=($(awk -F'=' '/^_/ {print $1}' "../data/translations/english.trans")) - -for lg in ../data/translations/*.trans ; do - trans=$(<"${lg}") - not=$(echo "${trans}" | grep -cE "#.*translate me") - echo -e "\n-- $(basename "${lg}") ${not} to translate --" - for key in "${fns[@]}"; do - if [[ ! $trans =~ $key ]]; then - echo -e "\t${key} not exist" - fi - done -done - -#echo -e "${fns[*]}" \ No newline at end of file diff --git a/bin/ma-launcher.in b/bin/ma-launcher.in index 10b2995..80f2b7f 100644 --- a/bin/ma-launcher.in +++ b/bin/ma-launcher.in @@ -1,4 +1,14 @@ -#!/bin/sh +# !/bin/bash +# +# Architect Installation Framework (2016-2017) +# +# Written by Carl Duff and @mandog for Archlinux +# Heavily modified and re-written by @Chrysostomus to install Manjaro instead +# Contributors: @papajoker, @oberon and the Manjaro-Community. +# +# This program is free software, provided under the GNU General Public License +# as published by the Free Software Foundation. So feel free to copy, distribute, +# or modify it as you wish. if [ -e /run/miso/bootmnt/manjaro ]; then install -Dm755 /usr/share/applications/manjaro-architect.desktop \ diff --git a/bin/manjaro-architect.in b/bin/manjaro-architect.in index ec043cc..cb0ed58 100644 --- a/bin/manjaro-architect.in +++ b/bin/manjaro-architect.in @@ -1,10 +1,10 @@ # !/bin/bash # -# Architect Installation Framework (version 2.3.1 - 26-Mar-2016) +# Architect Installation Framework (2016-2017) # -# Written by Carl Duff for Architect Linux -# -# Modified by Chrysostomus to install manjaro instead +# Written by Carl Duff and @mandog for Archlinux +# Heavily modified and re-written by @Chrysostomus to install Manjaro instead +# Contributors: @papajoker, @oberon and the Manjaro-Community. # # This program is free software, provided under the GNU General Public License # as published by the Free Software Foundation. So feel free to copy, distribute, @@ -27,4 +27,12 @@ select_language mk_connection check_requirements greeting -main_menu + +menu_choice + +if [[ menu_opt == "advanced" ]]; then + import ${LIBDIR}/util-menu-full.sh + main_menu_full +else + main_menu +fi diff --git a/bin/setup b/bin/setup index c418896..447e744 100644 --- a/bin/setup +++ b/bin/setup @@ -1,4 +1,14 @@ -#!/bin/sh +# !/bin/bash +# +# Architect Installation Framework (2016-2017) +# +# Written by Carl Duff and @mandog for Archlinux +# Heavily modified and re-written by @Chrysostomus to install Manjaro instead +# Contributors: @papajoker, @oberon and the Manjaro-Community. +# +# This program is free software, provided under the GNU General Public License +# as published by the Free Software Foundation. So feel free to copy, distribute, +# or modify it as you wish. while [[ ! $(ping -c 2 manjaro.org) ]]; do if [[ $(cat /proc/1/comm) == "systemd" ]];then diff --git a/data/translations/danish.trans b/data/translations/danish.trans index b2289c3..c8a4b33 100644 --- a/data/translations/danish.trans +++ b/data/translations/danish.trans @@ -25,6 +25,8 @@ _NoCon=" Internet forbindelse er ikke aktiv " _EstCon="Opret forbindelse?" _Config=" Opsæt " _ApplySet="\n Opretter forbindelse ...\n\n" +_ChMenu="Select Menu" # translate me ! +_ChMenuBody="The Regular Menu will guide you through the installation of a pre-configured Manjaro Environment with some additional choices.\nThe Advanced Menu can be used to install unconfigured desktops or Manjaro development profiles.\nAlso it includes additional selection of network and multimedia applications and some advanced system and security configuration." # translate me ! # Security and Tweaks _SecMenuTitle="Sikkerhed og Tilpasning" diff --git a/data/translations/dutch.trans b/data/translations/dutch.trans index 55b12d7..b4f35a3 100644 --- a/data/translations/dutch.trans +++ b/data/translations/dutch.trans @@ -24,6 +24,8 @@ _NoCon=" No Internet Detected. " # translate me ! _EstCon="Establish connection?" # translate me ! _Config=" Configure " # translate me ! _ApplySet="\n Applying settings ...\n\n" # translate me ! +_ChMenu="Select Menu" # translate me ! +_ChMenuBody="The Regular Menu will guide you through the installation of a pre-configured Manjaro Environment with some additional choices.\nThe Advanced Menu can be used to install unconfigured desktops or Manjaro development profiles.\nAlso it includes additional selection of network and multimedia applications and some advanced system and security configuration." # translate me ! # Veiligheid en aanpassingen _SecMenuTitle="Beveiliging en systemd instellen" diff --git a/data/translations/english.trans b/data/translations/english.trans index cdd9c21..7240a94 100644 --- a/data/translations/english.trans +++ b/data/translations/english.trans @@ -24,6 +24,8 @@ _NoCon=" No Internet Detected. " _EstCon="Establish connection?" _Config=" Configure " _ApplySet="\n Applying settings ...\n\n" +_ChMenu="Select Menu" +_ChMenuBody="The Regular Menu will guide you through the installation of a pre-configured Manjaro Environment with some additional choices.\nThe Advanced Menu can be used to install unconfigured desktops or Manjaro development profiles.\nAlso it includes additional selection of network and multimedia applications and some advanced system and security configuration." # Security and Tweaks _SecMenuTitle="Security and systemd Tweaks" diff --git a/data/translations/french.trans b/data/translations/french.trans index 0a33bfc..047fa94 100644 --- a/data/translations/french.trans +++ b/data/translations/french.trans @@ -25,6 +25,8 @@ _NoCon=" Pas de connexion Internet détectée. " _EstCon="Établir la connexion ?" _Config=" Configurer " _ApplySet="\nApplication des paramètres ...\n\n" +_ChMenu="Select Menu" # translate me ! +_ChMenuBody="The Regular Menu will guide you through the installation of a pre-configured Manjaro Environment with some additional choices.\nThe Advanced Menu can be used to install unconfigured desktops or Manjaro development profiles.\nAlso it includes additional selection of network and multimedia applications and some advanced system and security configuration." # translate me ! # Sécurité et réglages _SecMenuTitle="Sécurité et réglages de systemd" diff --git a/data/translations/german.trans b/data/translations/german.trans index efaf30c..27340b9 100644 --- a/data/translations/german.trans +++ b/data/translations/german.trans @@ -23,6 +23,8 @@ _NoCon=" Keine Internetverbindung. " _EstCon="Verbindung herstellen?" _Config=" Konfiguration " _ApplySet="\nEinstellungen speichern ...\n\n" +_ChMenu="Select Menu" # translate me ! +_ChMenuBody="The Regular Menu will guide you through the installation of a pre-configured Manjaro Environment with some additional choices.\nThe Advanced Menu can be used to install unconfigured desktops or Manjaro development profiles.\nAlso it includes additional selection of network and multimedia applications and some advanced system and security configuration." # translate me ! # Security and Tweaks _SecMenuTitle="System- und Sicherheitseinstellungen" diff --git a/data/translations/hungarian.trans b/data/translations/hungarian.trans index e42441e..959d4a7 100644 --- a/data/translations/hungarian.trans +++ b/data/translations/hungarian.trans @@ -24,6 +24,8 @@ _NoCon=" No Internet Detected. " # translate me ! _EstCon="Establish connection?" # translate me ! _Config=" Configure " # translate me ! _ApplySet="\n Applying settings ...\n\n" # translate me ! +_ChMenu="Select Menu" # translate me ! +_ChMenuBody="The Regular Menu will guide you through the installation of a pre-configured Manjaro Environment with some additional choices.\nThe Advanced Menu can be used to install unconfigured desktops or Manjaro development profiles.\nAlso it includes additional selection of network and multimedia applications and some advanced system and security configuration." # translate me ! # Biztonság és furmányos kiegészítések _SecMenuTitle="Biztonság és systemd lehetőségek" diff --git a/data/translations/italian.trans b/data/translations/italian.trans index 061075b..25a8769 100644 --- a/data/translations/italian.trans +++ b/data/translations/italian.trans @@ -24,6 +24,8 @@ _NoCon=" No Internet Detected. " # translate me ! _EstCon="Establish connection?" # translate me ! _Config=" Configure " # translate me ! _ApplySet="\n Applying settings ...\n\n" # translate me ! +_ChMenu="Select Menu" # translate me ! +_ChMenuBody="The Regular Menu will guide you through the installation of a pre-configured Manjaro Environment with some additional choices.\nThe Advanced Menu can be used to install unconfigured desktops or Manjaro development profiles.\nAlso it includes additional selection of network and multimedia applications and some advanced system and security configuration." # translate me ! # Security and Tweaks _SecMenuTitle="Securezza e systemd migliorie" diff --git a/data/translations/portuguese.trans b/data/translations/portuguese.trans index 3324817..9f5a856 100644 --- a/data/translations/portuguese.trans +++ b/data/translations/portuguese.trans @@ -24,6 +24,8 @@ _NoCon=" No Internet Detected. " # translate me ! _EstCon="Establish connection?" # translate me ! _Config=" Configure " # translate me ! _ApplySet="\n Applying settings ...\n\n" # translate me ! +_ChMenu="Select Menu" # translate me ! +_ChMenuBody="The Regular Menu will guide you through the installation of a pre-configured Manjaro Environment with some additional choices.\nThe Advanced Menu can be used to install unconfigured desktops or Manjaro development profiles.\nAlso it includes additional selection of network and multimedia applications and some advanced system and security configuration." # translate me ! # Segurança e Ajustes _SecMenuTitle="Segurança e Ajustes de systemd" diff --git a/data/translations/portuguese_brasil.trans b/data/translations/portuguese_brasil.trans index d07fef3..abcd97a 100644 --- a/data/translations/portuguese_brasil.trans +++ b/data/translations/portuguese_brasil.trans @@ -24,6 +24,8 @@ _NoCon=" No Internet Detected. " # translate me ! _EstCon="Establish connection?" # translate me ! _Config=" Configure " # translate me ! _ApplySet="\n Applying settings ...\n\n" # translate me ! +_ChMenu="Select Menu" # translate me ! +_ChMenuBody="The Regular Menu will guide you through the installation of a pre-configured Manjaro Environment with some additional choices.\nThe Advanced Menu can be used to install unconfigured desktops or Manjaro development profiles.\nAlso it includes additional selection of network and multimedia applications and some advanced system and security configuration." # translate me ! # Segurança e Ajustes _SecMenuTitle="Segurança e Ajustes de systemd" diff --git a/data/translations/russian.trans b/data/translations/russian.trans index d17f789..f573ef4 100644 --- a/data/translations/russian.trans +++ b/data/translations/russian.trans @@ -24,6 +24,8 @@ _NoCon=" Интернет не найден. " _EstCon="Установить соединение?" _Config=" Настроить " _ApplySet="\n Применяются настройки...\n\n" +_ChMenu="Select Menu" # translate me ! +_ChMenuBody="The Regular Menu will guide you through the installation of a pre-configured Manjaro Environment with some additional choices.\nThe Advanced Menu can be used to install unconfigured desktops or Manjaro development profiles.\nAlso it includes additional selection of network and multimedia applications and some advanced system and security configuration." # translate me ! # Security and Tweaks _SecMenuTitle="Настройки безопасности и systemd" diff --git a/data/translations/spanish.trans b/data/translations/spanish.trans index e97281b..a7f38c7 100644 --- a/data/translations/spanish.trans +++ b/data/translations/spanish.trans @@ -24,6 +24,8 @@ _NoCon=" No Internet Detected. " # translate me ! _EstCon="Establish connection?" # translate me ! _Config=" Configure " # translate me ! _ApplySet="\n Applying settings ...\n\n" # translate me ! +_ChMenu="Select Menu" # translate me ! +_ChMenuBody="The Regular Menu will guide you through the installation of a pre-configured Manjaro Environment with some additional choices.\nThe Advanced Menu can be used to install unconfigured desktops or Manjaro development profiles.\nAlso it includes additional selection of network and multimedia applications and some advanced system and security configuration." # translate me ! # Seguridad y ajustes _SecMenuTitle="Seguridad y ajustes de systemd" diff --git a/lib/util-base.sh b/lib/util-base.sh index bd7667f..051f815 100644 --- a/lib/util-base.sh +++ b/lib/util-base.sh @@ -1,3 +1,15 @@ +# !/bin/bash +# +# Architect Installation Framework (2016-2017) +# +# Written by Carl Duff and @mandog for Archlinux +# Heavily modified and re-written by @Chrysostomus to install Manjaro instead +# Contributors: @papajoker, @oberon and the Manjaro-Community. +# +# This program is free software, provided under the GNU General Public License +# as published by the Free Software Foundation. So feel free to copy, distribute, +# or modify it as you wish. + # virtual console keymap set_keymap() { KEYMAPS="" @@ -166,9 +178,9 @@ create_new_user() { done DIALOG "_DefShell" --radiolist "\n\n$_UseSpaceBar" 0 0 3 \ - "zsh" "-" on \ - "bash" "-" off \ - "fish" "-" off 2>/tmp/.shell + "zsh" "" on \ + "bash" "" off \ + "fish" "" off 2>/tmp/.shell shell=$(cat /tmp/.shell) # Enter password. This step will only be reached where the loop has been skipped or broken. diff --git a/lib/util-desktop.sh b/lib/util-desktop.sh index 4706138..d1ddd76 100644 --- a/lib/util-desktop.sh +++ b/lib/util-desktop.sh @@ -1,3 +1,15 @@ +# !/bin/bash +# +# Architect Installation Framework (2016-2017) +# +# Written by Carl Duff and @mandog for Archlinux +# Heavily modified and re-written by @Chrysostomus to install Manjaro instead +# Contributors: @papajoker, @oberon and the Manjaro-Community. +# +# This program is free software, provided under the GNU General Public License +# as published by the Free Software Foundation. So feel free to copy, distribute, +# or modify it as you wish. + install_de_wm() { # Only show this information box once if [[ $SHOW_ONCE -eq 0 ]]; then diff --git a/lib/util-disk.sh b/lib/util-disk.sh index 0f0e6d4..8958f8c 100644 --- a/lib/util-disk.sh +++ b/lib/util-disk.sh @@ -1,3 +1,15 @@ +# !/bin/bash +# +# Architect Installation Framework (2016-2017) +# +# Written by Carl Duff and @mandog for Archlinux +# Heavily modified and re-written by @Chrysostomus to install Manjaro instead +# Contributors: @papajoker, @oberon and the Manjaro-Community. +# +# This program is free software, provided under the GNU General Public License +# as published by the Free Software Foundation. So feel free to copy, distribute, +# or modify it as you wish. + # Unmount partitions. umount_partitions() { MOUNTED="" diff --git a/lib/util-menu-full.sh b/lib/util-menu-full.sh new file mode 100644 index 0000000..7adbaf4 --- /dev/null +++ b/lib/util-menu-full.sh @@ -0,0 +1,82 @@ +# !/bin/bash +# +# Architect Installation Framework (2016-2017) +# +# Written by Carl Duff and @mandog for Archlinux +# Heavily modified and re-written by @Chrysostomus to install Manjaro instead +# Contributors: @papajoker, @oberon and the Manjaro-Community. +# +# This program is free software, provided under the GNU General Public License +# as published by the Free Software Foundation. So feel free to copy, distribute, +# or modify it as you wish. + +main_menu_full() { + declare -i loopmenu=1 + while ((loopmenu)); do + 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}) + case $(cat ${ANSWER}) in + "1") prep_menu + ;; + "2") check_mount && install_base_menu + ;; + "3") check_base && install_graphics_menu_full + ;; + "4") check_base && config_base_menu + ;; + "5") check_base && install_network_menu + ;; + "6") check_base && install_multimedia_menu + ;; + "7") check_base && security_menu + ;; + "8") check_base && edit_configs + ;; + *) loopmenu=0 + exit_done + ;; + esac + done +} + +install_graphics_menu_full() { + local PARENT="$FUNCNAME" + declare -i loopmenu=1 + while ((loopmenu)); do + submenu 4 + DIALOG " $_InstGrMenuTitle " --default-item ${HIGHLIGHT_SUB} \ + --menu "$_InstGrMenuBody" 0 0 4 \ + "1" "$_InstGrMenuDD" \ + "2" "$_InstGrMenuGE|>" \ + "3" "$_PrepKBLayout" \ + "4" "$_Back" 2>${ANSWER} + HIGHLIGHT_SUB=$(cat ${ANSWER}) + + case $(cat ${ANSWER}) in + "1") setup_graphics_card + ;; + "2") install_desktop_menu + ;; + "3") set_xkbmap + ;; + *) loopmenu=0 + return 0 + ;; + esac + done +} diff --git a/lib/util-menu.sh b/lib/util-menu.sh index 3de28a1..4136117 100644 --- a/lib/util-menu.sh +++ b/lib/util-menu.sh @@ -1,3 +1,384 @@ + +# !/bin/bash +# +# Architect Installation Framework (2016-2017) +# +# Written by Carl Duff and @mandog for Archlinux +# Heavily modified and re-written by @Chrysostomus to install Manjaro instead +# Contributors: @papajoker, @oberon and the Manjaro-Community. +# +# This program is free software, provided under the GNU General Public License +# as published by the Free Software Foundation. So feel free to copy, distribute, +# or modify it as you wish. + +main_menu() { + declare -i loopmenu=1 + while ((loopmenu)); do + if [[ $HIGHLIGHT != 6 ]]; then + HIGHLIGHT=$(( HIGHLIGHT + 1 )) + fi + + DIALOG " $_MMTitle " --default-item ${HIGHLIGHT} \ + --menu "$_MMBody" 0 0 6 \ + "1" "$_PrepMenuTitle|>" \ + "2" "$_InstBsMenuTitle|>" \ + "3" "$_InstGrMenuTitle|>" \ + "4" "$_ConfBseMenuTitle|>" \ + "5" "$_SeeConfOptTitle|>" \ + "6" "$_Done" 2>${ANSWER} + HIGHLIGHT=$(cat ${ANSWER}) + + case $(cat ${ANSWER}) in + "1") prep_menu + ;; + "2") check_mount && install_base_menu + ;; + "3") check_base && install_graphics_menu + ;; + "4") check_base && config_base_menu + ;; + "5") check_base && edit_configs + ;; + *) loopmenu=0 + exit_done + ;; + esac + done +} + +# Preparation +prep_menu() { + local PARENT="$FUNCNAME" + declare -i loopmenu=1 + while ((loopmenu)); do + submenu 7 + DIALOG "$_PrepMenuTitle " --default-item ${HIGHLIGHT_SUB} \ + --menu "$_PrepMenuBody" 0 0 7 \ + "1" "$_VCKeymapTitle" \ + "2" "$_DevShowOpt" \ + "3" "$_PrepPartDisk" \ + "4" "$_PrepLUKS" \ + "5" "$_PrepLVM $_PrepLVM2" \ + "6" "$_PrepMntPart" \ + "7" "$_Back" 2>${ANSWER} + HIGHLIGHT_SUB=$(cat ${ANSWER}) + + case $(cat ${ANSWER}) in + "1") set_keymap + ;; + "2") show_devices + ;; + "3") umount_partitions + select_device + create_partitions + ;; + "4") luks_menu + ;; + "5") lvm_menu + ;; + "6") mount_partitions + ;; + *) loopmenu=0 + return 0 + ;; + esac + done +} + +# Base Installation +install_base_menu() { + local PARENT="$FUNCNAME" + declare -i loopmenu=1 + while ((loopmenu)); do + submenu 5 + DIALOG " $_InstBsMenuTitle " --default-item ${HIGHLIGHT_SUB} --menu "$_InstBseMenuBody" 0 0 5 \ + "1" "$_PrepMirror" \ + "2" "$_PrepPacKey" \ + "3" "$_InstBse" \ + "4" "$_InstBootldr" \ + "5" "$_Back" 2>${ANSWER} + HIGHLIGHT_SUB=$(cat ${ANSWER}) + + case $(cat ${ANSWER}) in + "1") configure_mirrorlist + ;; + "2") clear + pacman-key --init + pacman-key --populate archlinux manjaro + pacman-key --refresh-keys + check_for_error "refresh pacman-keys" + ;; + "3") install_base + ;; + "4") install_bootloader + ;; + *) loopmenu=0 + return 0 + ;; + esac + done +} + +# Base Configuration +config_base_menu() { + local PARENT="$FUNCNAME" + declare -i loopmenu=1 + while ((loopmenu)); do + submenu 8 + DIALOG "$_ConfBseBody" --default-item ${HIGHLIGHT_SUB} --menu " $_ConfBseMenuTitle " \ + 0 0 8 \ + "1" "$_ConfBseFstab" \ + "2" "$_ConfBseHost" \ + "3" "$_ConfBseSysLoc" \ + "4" "$_ConfBseTimeHC" \ + "5" "$_ConfUsrRoot" \ + "6" "$_ConfUsrNew" \ + "7" "$_MMRunMkinit" \ + "8" "$_Back" 2>${ANSWER} + HIGHLIGHT_SUB=$(cat ${ANSWER}) + + case $(cat ${ANSWER}) in + "1") generate_fstab + ;; + "2") set_hostname + ;; + "3") set_locale + ;; + "4") set_timezone + set_hw_clock + ;; + "5") set_root_password + ;; + "6") create_new_user + ;; + "7") run_mkinitcpio + ;; + *) loopmenu=0 + return 0 + ;; + esac + done +} + +install_graphics_menu() { + local PARENT="$FUNCNAME" + declare -i loopmenu=1 + while ((loopmenu)); do + submenu 4 + DIALOG " $_InstGrMenuTitle " --default-item ${HIGHLIGHT_SUB} \ + --menu "$_InstGrMenuBody" 0 0 4 \ + "1" "$_InstGrMenuDD" \ + "2" "$_InstDEStable" \ + "3" "$_PrepKBLayout" \ + "4" "$_Back" 2>${ANSWER} + HIGHLIGHT_SUB=$(cat ${ANSWER}) + + case $(cat ${ANSWER}) in + "1") setup_graphics_card + ;; + "2") install_manjaro_de_wm_pkg + ;; + "3") set_xkbmap + ;; + *) loopmenu=0 + return 0 + ;; + esac + done +} + +install_vanilla_de_wm() { + local PARENT="$FUNCNAME" + declare -i loopmenu=1 + while ((loopmenu)); do + submenu 4 + DIALOG " $_InstGrMenuTitle " --default-item ${HIGHLIGHT_SUB} \ + --menu "$_InstGrMenuBody" 0 0 4 \ + "1" "$_InstGrMenuDS" \ + "2" "$_InstGrDE" \ + "3" "$_InstGrMenuDM" \ + "4" "$_Back" 2>${ANSWER} + HIGHLIGHT_SUB=$(cat ${ANSWER}) + + case $(cat ${ANSWER}) in + "1") install_xorg_input + ;; + "2") install_de_wm + ;; + "3") install_dm + ;; + *) loopmenu=0 + return 0 + ;; + esac + done +} + +install_desktop_menu() { + local PARENT="$FUNCNAME" + declare -i loopmenu=1 + while ((loopmenu)); do + submenu 4 + DIALOG " $_InstGrMenuTitle " --default-item ${HIGHLIGHT_SUB} \ + --menu "$_InstDEMenuTitle" 0 0 4 \ + "1" "$_InstDEStable" \ + "2" "$_InstDEGit" \ + "3" "$_InstDE|>" \ + "4" "$_Back" 2>${ANSWER} + HIGHLIGHT_SUB=$(cat ${ANSWER}) + + case $(cat ${ANSWER}) in + "1") install_manjaro_de_wm_pkg + ;; + "2") install_manjaro_de_wm_git + ;; + "3") install_vanilla_de_wm + ;; + *) loopmenu=0 + return 0 + ;; + esac + done +} + +# Install Accessibility Applications +install_acc_menu() { + echo "" > ${PACKAGES} + + DIALOG " $_InstAccTitle " --checklist "$_InstAccBody" 0 0 15 \ + "accerciser" "-" off \ + "at-spi2-atk" "-" off \ + "at-spi2-core" "-" off \ + "brltty" "-" off \ + "caribou" "-" off \ + "dasher" "-" off \ + "espeak" "-" off \ + "espeakup" "-" off \ + "festival" "-" off \ + "java-access-bridge" "-" off \ + "java-atk-wrapper" "-" off \ + "julius" "-" off \ + "orca" "-" off \ + "qt-at-spi" "-" off \ + "speech-dispatcher" "-" off 2>${PACKAGES} + + clear + # If something has been selected, install + if [[ $(cat ${PACKAGES}) != "" ]]; then + basestrap ${MOUNTPOINT} ${PACKAGES} 2>$ERR + check_for_error "$FUNCNAME" $? + fi +} + +edit_configs() { + declare -i loopmenu=1 + while ((loopmenu)); do + local PARENT="$FUNCNAME" + + # Clear the file variables + FILE="" + user_list="" + + submenu 13 + DIALOG " $_SeeConfOptTitle " --default-item ${HIGHLIGHT_SUB} --menu "$_SeeConfOptBody" 0 0 13 \ + "1" "/etc/vconsole.conf" \ + "2" "/etc/locale.conf" \ + "3" "/etc/hostname" \ + "4" "/etc/hosts" \ + "5" "/etc/sudoers" \ + "6" "/etc/mkinitcpio.conf" \ + "7" "/etc/fstab" \ + "8" "/etc/crypttab" \ + "9" "grub/syslinux/systemd-boot" \ + "10" "lxdm/lightdm/sddm" \ + "11" "/etc/pacman.conf" \ + "12" "~/.xinitrc" \ + "13" "$_Back" 2>${ANSWER} + HIGHLIGHT_SUB=$(cat ${ANSWER}) + + case $(cat ${ANSWER}) in + "1") [[ -e ${MOUNTPOINT}/etc/vconsole.conf ]] && FILE="${MOUNTPOINT}/etc/vconsole.conf" + ;; + "2") [[ -e ${MOUNTPOINT}/etc/locale.conf ]] && FILE="${MOUNTPOINT}/etc/locale.conf" + ;; + "3") [[ -e ${MOUNTPOINT}/etc/hostname ]] && FILE="${MOUNTPOINT}/etc/hostname" + ;; + "4") [[ -e ${MOUNTPOINT}/etc/hosts ]] && FILE="${MOUNTPOINT}/etc/hosts" + ;; + "5") [[ -e ${MOUNTPOINT}/etc/sudoers ]] && FILE="${MOUNTPOINT}/etc/sudoers" + ;; + "6") [[ -e ${MOUNTPOINT}/etc/mkinitcpio.conf ]] && FILE="${MOUNTPOINT}/etc/mkinitcpio.conf" + ;; + "7") [[ -e ${MOUNTPOINT}/etc/fstab ]] && FILE="${MOUNTPOINT}/etc/fstab" + ;; + "8") [[ -e ${MOUNTPOINT}/etc/crypttab ]] && FILE="${MOUNTPOINT}/etc/crypttab" + ;; + "9") [[ -e ${MOUNTPOINT}/etc/default/grub ]] && FILE="${MOUNTPOINT}/etc/default/grub" + [[ -e ${MOUNTPOINT}/boot/syslinux/syslinux.cfg ]] && FILE="$FILE ${MOUNTPOINT}/boot/syslinux/syslinux.cfg" + if [[ -e ${MOUNTPOINT}${UEFI_MOUNT}/loader/loader.conf ]]; then + files=$(ls ${MOUNTPOINT}${UEFI_MOUNT}/loader/entries/*.conf) + for i in ${files}; do + FILE="$FILE ${i}" + done + fi + ;; + "10") [[ -e ${MOUNTPOINT}/etc/lxdm/lxdm.conf ]] && FILE="${MOUNTPOINT}/etc/lxdm/lxdm.conf" + [[ -e ${MOUNTPOINT}/etc/lightdm/lightdm.conf ]] && FILE="${MOUNTPOINT}/etc/lightdm/lightdm.conf" + [[ -e ${MOUNTPOINT}/etc/sddm.conf ]] && FILE="${MOUNTPOINT}/etc/sddm.conf" + ;; + "11") [[ -e ${MOUNTPOINT}/etc/pacman.conf ]] && FILE="${MOUNTPOINT}/etc/pacman.conf" + ;; + "12") user_list=$(ls ${MOUNTPOINT}/home/ | sed "s/lost+found//") + for i in ${user_list}; do + [[ -e ${MOUNTPOINT}/home/$i/.xinitrc ]] && FILE="$FILE ${MOUNTPOINT}/home/$i/.xinitrc" + done + ;; + *) return 0 + ;; + esac + + if [[ $FILE != "" ]]; then + nano $FILE + if [[ $FILE == "${MOUNTPOINT}/etc/mkinitcpio.conf" ]]; then + dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --yesno "${_MMRunMkinit}?" 0 0 && { + run_mkinitcpio 2>$ERR + check_for_error "run_mkinitcpio" "$?" edit_configs + } + fi + else + DIALOG " $_ErrTitle " --msgbox "$_SeeConfErrBody" 0 0 + fi + done +} + + + + + + + + + + + + + + + + + + + + + + + + + + +#################################################################################################################### +#################################################################################################################### + main_menu() { declare -i loopmenu=1 while ((loopmenu)); do diff --git a/lib/util.sh b/lib/util.sh index d852831..7d7fe9e 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -1,10 +1,10 @@ # !/bin/bash # -# Architect Installation Framework (version 2.3.1 - 26-Mar-2016) +# Architect Installation Framework (2016-2017) # -# Written by Carl Duff for Architect Linux -# -# Modified by Chrysostomus to install manjaro instead +# Written by Carl Duff and @mandog for Archlinux +# Heavily modified and re-written by @Chrysostomus to install Manjaro instead +# Contributors: @papajoker, @oberon and the Manjaro-Community. # # This program is free software, provided under the GNU General Public License # as published by the Free Software Foundation. So feel free to copy, distribute, @@ -297,6 +297,14 @@ greeting() { DIALOG " $_WelTitle $VERSION " --msgbox "$_WelBody" 0 0 } +# Choose between the compact and extended installer menu +menu_choice() { + DIALOG "$_ChMenu" --radiolist "\n\n$_ChMenuBody" 0 0 2 \ + "regular" "" on \ + "advanced" "" off 2>${ANSWER} + menu_opt=$(cat ${ANSWER}) +} + # Originally adapted from AIS. Added option to allow users to edit the mirrorlist. configure_mirrorlist() { DIALOG " $_MirrorlistTitle " \