From 122efebff263eacf9e10a9bd9e7fdb0b0cdb6bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20B=C3=B8e?= Date: Mon, 28 Oct 2019 23:56:17 +0100 Subject: [PATCH 01/23] Translated to norwegian Added support for the Norwegian language --- lng/Norwegian | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 lng/Norwegian diff --git a/lng/Norwegian b/lng/Norwegian new file mode 100644 index 0000000..fc9f2d9 --- /dev/null +++ b/lng/Norwegian @@ -0,0 +1,103 @@ +# Arch Linux Fast Install (archfi) +# -------------------------------- +# project : https://github.com/MatMoul/archfi +# language : Norwegian +# translator : mrboen94 (pseudo, name or e-mail.) +# notes : misc text... + + + +locale=en_US.UTF-8 +#font= + +txtexit="Avslutt" +txtback="Tilbake" +txtignore="Ignorer" + +txtselectserver="Velg kilde server :" + +txtmainmenu="Hovedmeny" +txtlanguage="Språk" +txtsetkeymap="Sett tastaturlayout" +txteditor="Teksteditor" +txtdiskpartmenu="Disk Partisjoner" +txtselectpartsmenu="Velg Partisjoner og installer" +txthelp="Hjelp" +txtchangelog="Endringslogg" +txtreboot="Restart" + +txtautoparts="Auto Partisjonering" +txteditparts="Endre Partisjoner" + +txtautopartsconfirm="Valgt Enhet : %1\n\nAlle data vil bli slettet ! \n\nFortsett ?" + +txtautopartclear="Fjern all partisjoneringsdata" +txtautopartcreate="Sett %1 partisjon" +txthybridpartcreate="Sett hybrid MBR" +txtautopartsettype="Sett %1 partition type" + +txtselectdevice="Velg %1 Enhet :" +txtselecteddevices="Velg Enheter :" + +txtformatmountmenu="Formater og Monter" +txtformatdevices="Formater Enheter" +txtformatdevice="Format Device" +txtmount="Monter" +txtunmount="Avmonter" +txtmountdesc="Installer eller Konfigurer" + +txtformatdeviceconfirm="Advarsel, all data på de Valgte Enhetene vil bli Slettet ! \nFortsett Formatering ?" + +txtselectpartformat="Velg Partisjonsformat for %1 :" +txtformatingpart="Formaterer partisjon %1 som" +txtcreateluksdevice="Lag en luks Enhet :" +txtopenluksdevice="Åpne luks Enhet :" +txtluksdevicecreated="luks Enhet oprettet !" + +txtinstallmenu="Installeringsmeny" + +txtarchinstallmenu="Arch Installeringsmeny" + +txteditmirrorlist="Rediger Speillisten" +txtinstallarchlinux="Installer Arch Linux" +txtconfigarchlinux="Configurer Arch Linux" + +txtsethostname="Sett datamaskinnavn" +txtsetfont="Sett Font" +txtsetlocale="Sett Locale" +txtsettime="Sett Tid" +txtsetrootpassword="Sett root passord" + +txtuseutcclock="Bruk UTC Maskinvare klokke ?" + +txtbootloader="Bootloader" +txtbootloadermenu="Velg din bootloader" + +txtefibootmgr="efibootmgr er nødvendig for EFI datamaskiner." + +txtbootloadergrubmenu="Grub Installerings Meny" +txtrungrubmakeconfig="Kjør grub-mkconfig ?" +txtgrubluksdetected="Kryptert root partisjon !\n\nLegg cryptdevice= til GRUB_CMDLINE_LINUX i /etc/default/grub ?" + +txtbootloadersyslinuxmenu="Syslinux Installerings Meny" +txtsyslinuxaddefibootmgr="EFI installasjon trenger efibootmgr" +txtsyslinuxaddgptfdisk="GPT disk trenger gptfdisk" +txtsyslinuxaddmtools="FAT boot partisjon trenger mtools" + +txtbootloaderrefindmenu="rEFInd Installerings Meny" + +txtoptional="Valgfritt" +txtrecommandeasyinst="Anbefalt for enkel installering" +txtset="Sett %1" +txtgenerate="Generer %1" +txtedit="Endre %1" +txtinstall="Installer %1" +txtenable="Skru på %1" + +txtpressanykey="Trykk en tast for å fortsette." + +txtarchdidesc="Fult installerings-script" +txtinstallarchdi="Arch Linux Desktop Install (archdi) er et annet script som kan hjelpe deg å installere en full arbeidsstasjon.\n\nDu kan bare kjøre scriptet eller installere det. Velg i den neste menyen.\n\nArch Linux Desktop Install som to avhengigheter : wget og libnewt.\n\npacstrap wget libnewt ?" +txtarchdiinstallandlaunch="Installer og kjør archdi" +txtarchdiinstall="Installer archdi" +txtarchdilaunch="Kjør archdi" From 050c1ffb8a05c27d14837878ea844ac4cf9ebc5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20B=C3=B8e?= Date: Tue, 29 Oct 2019 00:01:57 +0100 Subject: [PATCH 02/23] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a3b9d57..edfa200 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,4 +7,4 @@ * **Preserve identation on empty line** * **Test your changes** -- [ ] I've read these rules before submitting my PR. +- [X] I've read these rules before submitting my PR. From bb336a085407bac5dc2cd4c34b055a381e2f3648 Mon Sep 17 00:00:00 2001 From: Mohammad Alawadi <50278149+mohdalawadi@users.noreply.github.com> Date: Mon, 16 Dec 2019 02:18:57 +0400 Subject: [PATCH 03/23] Create Arabic This is a translation of the Archfi script to Arabic. --- lng/Arabic | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 lng/Arabic diff --git a/lng/Arabic b/lng/Arabic new file mode 100644 index 0000000..57915c8 --- /dev/null +++ b/lng/Arabic @@ -0,0 +1,106 @@ +# Arch Linux Fast Install (archfi) +# -------------------------------- +# project : https://github.com/MatMoul/archfi +# language : Arabic +# translator : Mohammad Alawadi (https://twitter.com/MAlawadi6) +# notes : تم ترجمة السكربت لتسهيل عملية تثبيت آرتش لينكس على اخواني العرب +# أحث كل المهتمين بلينكس وعندهم رغبة تجربة نظام آرتش لينكس بتجربة السكربت هذا اللي يسهل +# عملية تثبيت نظام التشغيل بكل سهولة وأريحية .. لأي استفسار كلموني في تويتر أو من خلال: +# root@mohdalawadi.com + + +locale=en_US.UTF-8 +#font= + +txtexit="خروج" +txtback="رجوع" +txtignore="تجاهل" + +txtselectserver="حدد الخادم (السرفر) المصدر (سورس) :" + +txtmainmenu="القائمة الرئيسية" +txtlanguage="اللغة" +txtsetkeymap="تعيين تخطيط لوحة المفاتيح" +txteditor="محرر" +txtdiskpartmenu="أقسام القرص" +txtselectpartsmenu="حدد أقسام القرص وثبت" +txthelp="مساعدة" +txtchangelog="سجل التغيير" +txtreboot="إعادة التشغيل" + +txtautoparts="أقسام تلقائية" +txteditparts="تعديل الأقسام" + +txtautopartsconfirm="الجهاز المحدد : %1\n\nسيتم مسح جميع البيانات ! \n\nنُكمل؟" + +txtautopartclear="مسح جميع بيانات القسم" +txtautopartcreate="إنشاء %1 قسم" +txthybridpartcreate="تعيين سجل التمهيد الرئيسي المختلط" +txtautopartsettype="تعيين %1 نوع القسم" + +txtselectdevice="اختر %1 جهاز :" +txtselecteddevices="الأجهزة المختارة :" + +txtformatmountmenu="شطب وتثبيت" +txtformatdevices="حذف الأجهزة" +txtformatdevice="حذف الجهاز" +txtmount="تثبيت" +txtunmount="إلغاء التثبيت" +txtmountdesc="تثبيت أو تعديل" + +txtformatdeviceconfirm="تحذير ، سيتم مسح جميع البيانات الموجودة على الأجهزة المحددة ! \nشطب الأجهزة؟" + +txtselectpartformat="حدد قسم شطب لـ %1 :" +txtformatingpart="شطب قسم %1 كـ " +txtcreateluksdevice="إنشاء جهاز luks :" +txtopenluksdevice="فتح جهاز luks :" +txtluksdevicecreated="تم إنشاء جهاز luks !" + +txtinstallmenu="قائمة التثبيت" + +txtarchinstallmenu="قائمة تثبيت آرتش لينكس" + +txteditmirrorlist="تعديل قائمة المرآة" +txtinstallarchlinux="تثبيت آرتش لينكس" +txtinstallfirmware="تثبيت البرامج الثابتة" +txtconfigarchlinux="تعديل آرتش لينكس" + +txtsethostname="تعيين اسم الكمبيوتر" +txtsetfont="تعيين الخط" +txtsetlocale="ضبط اللغة" +txtsettime="ضبط الوقت" +txtsetrootpassword="تعيين كلمة المرور الروت" + +txtuseutcclock="هل تريد استخدام ساعة الأجهزة UTC؟" + +txtbootloader="محمل الإقلاع" +txtbootloadermenu="اختر محمل الإقلاع" + +txtefibootmgr="efibootmgr مطلوب لأجهزة كمبيوتر EFI." + +txtbootloadergrubmenu="قائمة تثبيت Grub" +txtrungrubmakeconfig="شغل grub-mkconfig ؟" +txtgrubluksdetected="قسم الروت المشفر !\n\nنضيف cryptdevice= إلى GRUB_CMDLINE_LINUX في /etc/default/grub ؟" + +txtbootloadersyslinuxmenu="قائمة تثبيت Syslinux" +txtsyslinuxaddefibootmgr="تثبيت EFI يتطلب efibootmgr" +txtsyslinuxaddgptfdisk="أسطوانة GPT تتطلب gptfdisk" +txtsyslinuxaddmtools="جزء FAT للتشغيل يتطلب mtools " + +txtbootloaderrefindmenu="قائمة تثبيت rEFInd" + +txtoptional="إختياري" +txtrecommandeasyinst="الموصى بها لتسهيل عملية التثبيت" +txtset="وضع %1" +txtgenerate="إنشاء %1" +txtedit="تعديل %1" +txtinstall="تثبيت %1" +txtenable="مكن %1" + +txtpressanykey="اضغط على أي زر للإستمرار" + +txtarchdidesc="النص الكامل لتثبيت سطح المكتب" +txtinstallarchdi="Arch Linux Desktop Install (archdi) هو برنامج نصي ثاني يمكنه مساعدتك في تثبيت محطة عمل كاملة.\n\nيمكنك فقط تشغيل البرنامج النصي أو تثبيته. اختر في القائمة التالية.\n\nيحتوي Arch Linux Desktop Install على اثنين من التبعيات : wget and libnewt.\n\npacstrap wget libnewt ؟" +txtarchdiinstallandlaunch="تثبيت وتشغيل archdi" +txtarchdiinstall="نصب archdi" +txtarchdilaunch="إطلاق archdi" From 1d4d8366c00764254b657b2ac109a17e3e5aa1ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elges=20Istv=C3=A1n?= Date: Fri, 13 Mar 2020 19:47:11 +0000 Subject: [PATCH 04/23] Fix typo in README I assume it is meant do "developer" not "developper". --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f643f26..42598ce 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Then follow the on-screen instructions to completion. If you require extra help, visit the provided video playlist and follow my example. -## For developpers +## For developers You can test your script with this command : From dbb22dc59b534391d7e7ced79e38a0c3e3c0ace8 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Fri, 3 Apr 2020 20:21:19 +0200 Subject: [PATCH 05/23] Add used fs to pacstrap --- archfi | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 59 insertions(+), 6 deletions(-) diff --git a/archfi b/archfi index 405734b..9a6d959 100644 --- a/archfi +++ b/archfi @@ -15,6 +15,7 @@ apptitle="Arch Linux Fast Install (archfi) - Version: 2020.03.09.20.29.12 (GPLv3)" baseurl=https://raw.githubusercontent.com/MatMoul/archfi/master skipfont="0" +fspkgs="" # -------------------------------------------------------- @@ -488,6 +489,7 @@ mountmenu(){ formatdevices(){ if (whiptail --backtitle "${apptitle}" --title "${txtformatdevices}" --yesno "${txtformatdeviceconfirm}" --defaultno 0 0) then + fspkgs="" if [ ! "${bootdev}" = "" ]; then formatbootdevice boot ${bootdev} fi @@ -534,6 +536,7 @@ formatbootdevice(){ mkfs.ext4 ${2} ;; fat32) + fspkgs="${fspkgs[@]} dosfstools" echo "mkfs.fat ${2}" mkfs.fat ${2} ;; @@ -587,6 +590,7 @@ formatdevice(){ echo "----------------------------------------------" case ${sel} in btrfs) + fspkgs="${fspkgs[@]} btrfs-progs" echo "mkfs.btrfs -f ${2}" mkfs.btrfs -f ${2} if [ "${1}" = "root" ]; then @@ -613,18 +617,22 @@ formatdevice(){ mkfs.ext2 ${2} ;; xfs) + fspkgs="${fspkgs[@]} xfsprogs" echo "mkfs.xfs -f ${2}" mkfs.xfs -f ${2} ;; f2fs) + fspkgs="${fspkgs[@]} f2fs-tools" echo "mkfs.f2fs $2" mkfs.f2fs $2 ;; jfs) + fspkgs="${fspkgs[@]} jfsutils" echo "mkfs.xfs -f ${2}" mkfs.jfs -f ${2} ;; reiserfs) + fspkgs="${fspkgs[@]} reiserfsprogs" echo "mkfs.reiserfs -f ${2}" mkfs.reiserfs -f ${2} ;; @@ -728,7 +736,7 @@ installmenu(){ options=() options+=("${txtselectmirrorsbycountry}" "(${txtoptional})") options+=("${txteditmirrorlist}" "(${txtoptional})") - options+=("${txtinstallarchlinux}" "pacstrap base kernel firmwares") + options+=("${txtinstallarchlinux}" "pacstrap") options+=("${txtconfigarchlinux}" "") sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallmenu}" --menu "" --cancel-button "${txtunmount}" --default-item "${nextitem}" 0 0 0 \ "${options[@]}" \ @@ -779,14 +787,13 @@ selectmirrorsbycountry() { } installbase(){ - clear - pkgs="base" + pkgs=${basepkgs} options=() options+=("linux" "") options+=("linux-lts" "") options+=("linux-zen" "") options+=("linux-hardened" "") - sel=$(whiptail --backtitle "${apptitle}" --title "Kernel" --menu "" 0 0 0 \ + sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallarchlinuxkernel}" --menu "" 0 0 0 \ "${options[@]}" \ 3>&1 1>&2 2>&3) if [ "$?" = "0" ]; then @@ -794,9 +801,10 @@ installbase(){ else return 1 fi + options=() options+=("linux-firmware" "(${txtoptional})" on) - sel=$(whiptail --backtitle "${apptitle}" --title "Firmwares" --checklist "" 0 0 0 \ + sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallarchlinuxfirmwares}" --checklist "" 0 0 0 \ "${options[@]}" \ 3>&1 1>&2 2>&3) if [ ! "$?" = "0" ]; then @@ -805,6 +813,49 @@ installbase(){ for itm in $sel; do pkgs="$pkgs $(echo $itm | sed 's/"//g')" done + + options=() + if [[ "${fspkgs}" == *"dosfstools"* ]]; then + options+=("dosfstools" "" on) + else + options+=("dosfstools" "" off) + fi + if [[ "${fspkgs}" == *"btrfs-progs"* ]]; then + options+=("btrfs-progs" "" on) + else + options+=("btrfs-progs" "" off) + fi + if [[ "${fspkgs}" == *"xfsprogs"* ]]; then + options+=("xfsprogs" "" on) + else + options+=("xfsprogs" "" off) + fi + if [[ "${fspkgs}" == *"f2fs-tools"* ]]; then + options+=("f2fs-tools" "" on) + else + options+=("f2fs-tools" "" off) + fi + if [[ "${fspkgs}" == *"jfsutils"* ]]; then + options+=("jfsutils" "" on) + else + options+=("jfsutils" "" off) + fi + if [[ "${fspkgs}" == *"reiserfsprogs"* ]]; then + options+=("reiserfsprogs" "" on) + else + options+=("reiserfsprogs" "" off) + fi + sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallarchlinuxfilesystems}" --checklist "" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ ! "$?" = "0" ]; then + return 1 + fi + for itm in $sel; do + pkgs="$pkgs $(echo $itm | sed 's/"//g')" + done + + clear echo "pacstrap /mnt ${pkgs}" pacstrap /mnt ${pkgs} pressanykey @@ -1774,7 +1825,9 @@ loadstrings(){ txtselectcountry="Select country" txteditmirrorlist="Edit mirrorlist" txtinstallarchlinux="Install Arch Linux" - txtinstallfirmware="Install Firmware" + txtinstallarchlinuxkernel="Kernel" + txtinstallarchlinuxfirmwares="Firmwares" + txtinstallarchlinuxfilesystems="File Systems" txtconfigarchlinux="Config Arch Linux" txtsethostname="Set Computer Name" From a1a1fd76e2e2171c91a6356cebe0ddac1523f19d Mon Sep 17 00:00:00 2001 From: MatMoul Date: Fri, 3 Apr 2020 20:26:04 +0200 Subject: [PATCH 06/23] Add used fs to pacstrap --- archfi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archfi b/archfi index 9a6d959..e31fa33 100644 --- a/archfi +++ b/archfi @@ -787,7 +787,7 @@ selectmirrorsbycountry() { } installbase(){ - pkgs=${basepkgs} + pkgs="base" options=() options+=("linux" "") options+=("linux-lts" "") From 05bb9f2011aa0dd5be5f8cca2e11933772c8aac9 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Fri, 3 Apr 2020 20:34:09 +0200 Subject: [PATCH 07/23] Update identation --- archfi | 3284 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 1642 insertions(+), 1642 deletions(-) diff --git a/archfi b/archfi index e31fa33..c895ffa 100644 --- a/archfi +++ b/archfi @@ -20,145 +20,145 @@ fspkgs="" # -------------------------------------------------------- mainmenu(){ - if [ "${1}" = "" ]; then - nextitem="." - else - nextitem=${1} - fi - options=() - options+=("${txtlanguage}" "Language") - options+=("${txtsetkeymap}" "(loadkeys ...)") - options+=("${txteditor}" "(${txtoptional})") - options+=("${txtdiskpartmenu}" "") - options+=("${txtselectpartsmenu}" "") - options+=("" "") - options+=("${txtreboot}" "") - sel=$(whiptail --backtitle "${apptitle}" --title "${txtmainmenu}" --menu "" --cancel-button "${txtexit}" --default-item "${nextitem}" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - case ${sel} in - "${txtlanguage}") - chooselanguage - nextitem="${txtsetkeymap}" - ;; - "${txtsetkeymap}") - setkeymap - nextitem="${txtdiskpartmenu}" - ;; - "${txteditor}") - chooseeditor - nextitem="${txtdiskpartmenu}" - ;; - "${txtdiskpartmenu}") - diskpartmenu - nextitem="${txtselectpartsmenu}" - ;; - "${txtselectpartsmenu}") - selectparts - nextitem="${txtreboot}" - ;; - "${txthelp}") - help - nextitem="${txtreboot}" - ;; - "${txtchangelog}") - showchangelog - nextitem="${txtreboot}" - ;; - "${txtreboot}") - rebootpc - nextitem="${txtreboot}" - ;; - esac - mainmenu "${nextitem}" - else - clear - fi + if [ "${1}" = "" ]; then + nextitem="." + else + nextitem=${1} + fi + options=() + options+=("${txtlanguage}" "Language") + options+=("${txtsetkeymap}" "(loadkeys ...)") + options+=("${txteditor}" "(${txtoptional})") + options+=("${txtdiskpartmenu}" "") + options+=("${txtselectpartsmenu}" "") + options+=("" "") + options+=("${txtreboot}" "") + sel=$(whiptail --backtitle "${apptitle}" --title "${txtmainmenu}" --menu "" --cancel-button "${txtexit}" --default-item "${nextitem}" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + case ${sel} in + "${txtlanguage}") + chooselanguage + nextitem="${txtsetkeymap}" + ;; + "${txtsetkeymap}") + setkeymap + nextitem="${txtdiskpartmenu}" + ;; + "${txteditor}") + chooseeditor + nextitem="${txtdiskpartmenu}" + ;; + "${txtdiskpartmenu}") + diskpartmenu + nextitem="${txtselectpartsmenu}" + ;; + "${txtselectpartsmenu}") + selectparts + nextitem="${txtreboot}" + ;; + "${txthelp}") + help + nextitem="${txtreboot}" + ;; + "${txtchangelog}") + showchangelog + nextitem="${txtreboot}" + ;; + "${txtreboot}") + rebootpc + nextitem="${txtreboot}" + ;; + esac + mainmenu "${nextitem}" + else + clear + fi } chooselanguage(){ - options=() - options+=("Brazilian" "(By MaxWilliamJF)") - options+=("Dutch" "(By bowero)") - options+=("English" "(By MatMoul)") - options+=("French" "(By MatMoul)") - options+=("German" "(By untergrundbiber)") - options+=("Greek" "(By quelotic)") - options+=("Italian" "(By thegoldgoat)") - options+=("Hungarian" "(By KardiWeb)") - options+=("Polish" "(By dawidd6)") - options+=("Portuguese" "(By hugok)") - options+=("Russian" "(By Anonymous_Prodject)") - options+=("Spanish" "(By Mystogab)") - options+=("Turkish" "(By c0b41)") - sel=$(whiptail --backtitle "${apptitle}" --title "${txtlanguage}" --menu "" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - clear - if [ "${sel}" = "English" ]; then - loadstrings - else - eval $(curl -L ${baseurl}/lng/${sel} | sed '/^#/ d') - fi - if [ "${skipfont}" = "0" ]; then - eval $(setfont ${font}) - fi - font= - if [ "$(cat /etc/locale.gen | grep ""#${locale}"")" != "" ]; then - sed -i "/#${locale}/s/^#//g" /etc/locale.gen - locale-gen - fi - export LANG=${locale} - fi + options=() + options+=("Brazilian" "(By MaxWilliamJF)") + options+=("Dutch" "(By bowero)") + options+=("English" "(By MatMoul)") + options+=("French" "(By MatMoul)") + options+=("German" "(By untergrundbiber)") + options+=("Greek" "(By quelotic)") + options+=("Italian" "(By thegoldgoat)") + options+=("Hungarian" "(By KardiWeb)") + options+=("Polish" "(By dawidd6)") + options+=("Portuguese" "(By hugok)") + options+=("Russian" "(By Anonymous_Prodject)") + options+=("Spanish" "(By Mystogab)") + options+=("Turkish" "(By c0b41)") + sel=$(whiptail --backtitle "${apptitle}" --title "${txtlanguage}" --menu "" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + clear + if [ "${sel}" = "English" ]; then + loadstrings + else + eval $(curl -L ${baseurl}/lng/${sel} | sed '/^#/ d') + fi + if [ "${skipfont}" = "0" ]; then + eval $(setfont ${font}) + fi + font= + if [ "$(cat /etc/locale.gen | grep ""#${locale}"")" != "" ]; then + sed -i "/#${locale}/s/^#//g" /etc/locale.gen + locale-gen + fi + export LANG=${locale} + fi } setkeymap(){ - #items=$(localectl list-keymaps) - #options=() - #for item in ${items}; do - # options+=("${item}" "") - #done - items=$(find /usr/share/kbd/keymaps/ -type f -printf "%f\n" | sort -V) - options=() - for item in ${items}; do - options+=("${item%%.*}" "") - done - keymap=$(whiptail --backtitle "${apptitle}" --title "${txtsetkeymap}" --menu "" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - clear - echo "loadkeys ${keymap}" - loadkeys ${keymap} - pressanykey - fi + #items=$(localectl list-keymaps) + #options=() + #for item in ${items}; do + # options+=("${item}" "") + #done + items=$(find /usr/share/kbd/keymaps/ -type f -printf "%f\n" | sort -V) + options=() + for item in ${items}; do + options+=("${item%%.*}" "") + done + keymap=$(whiptail --backtitle "${apptitle}" --title "${txtsetkeymap}" --menu "" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + clear + echo "loadkeys ${keymap}" + loadkeys ${keymap} + pressanykey + fi } chooseeditor(){ - options=() - options+=("nano" "") - options+=("vim" "") - options+=("vi" "") - options+=("edit" "") - sel=$(whiptail --backtitle "${apptitle}" --title "${txteditor}" --menu "" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - clear - echo "export EDITOR=${sel}" - export EDITOR=${sel} - EDITOR=${sel} - pressanykey - fi + options=() + options+=("nano" "") + options+=("vim" "") + options+=("vi" "") + options+=("edit" "") + sel=$(whiptail --backtitle "${apptitle}" --title "${txteditor}" --menu "" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + clear + echo "export EDITOR=${sel}" + export EDITOR=${sel} + EDITOR=${sel} + pressanykey + fi } rebootpc(){ - if (whiptail --backtitle "${apptitle}" --title "${txtreboot}" --yesno "${txtreboot} ?" --defaultno 0 0) then - clear - reboot - fi + if (whiptail --backtitle "${apptitle}" --title "${txtreboot}" --yesno "${txtreboot} ?" --defaultno 0 0) then + clear + reboot + fi } # -------------------------------------------------------- @@ -166,221 +166,221 @@ rebootpc(){ # -------------------------------------------------------- selectdisk(){ - items=$(lsblk -d -p -n -l -o NAME,SIZE -e 7,11) - options=() - IFS_ORIG=$IFS - IFS=$'\n' - for item in ${items} - do - options+=("${item}" "") - done - IFS=$IFS_ORIG - result=$(whiptail --backtitle "${APPTITLE}" --title "${1}" --menu "" 0 0 0 "${options[@]}" 3>&1 1>&2 2>&3) - if [ "$?" != "0" ] - then - return 1 - fi - echo ${result%%\ *} - return 0 + items=$(lsblk -d -p -n -l -o NAME,SIZE -e 7,11) + options=() + IFS_ORIG=$IFS + IFS=$'\n' + for item in ${items} + do + options+=("${item}" "") + done + IFS=$IFS_ORIG + result=$(whiptail --backtitle "${APPTITLE}" --title "${1}" --menu "" 0 0 0 "${options[@]}" 3>&1 1>&2 2>&3) + if [ "$?" != "0" ] + then + return 1 + fi + echo ${result%%\ *} + return 0 } diskpartmenu(){ - if [ "${1}" = "" ]; then - nextitem="." - else - nextitem=${1} - fi - options=() - if [ "${eficomputer}" == "0" ]; then - options+=("${txtautoparts} (gpt)" "") - options+=("${txtautoparts} (dos)" "") - else - options+=("${txtautoparts} (gpt,efi)" "") - options+=("${txtautoparts} (gpt)" "") - options+=("${txtautoparts} (dos)" "") - options+=("${txtautoparts} (gpt,bios+efi,noswap)" "") - fi - options+=("${txteditparts} (cfdisk)" "") - options+=("${txteditparts} (cgdisk)" "") - sel=$(whiptail --backtitle "${apptitle}" --title "${txtdiskpartmenu}" --menu "" --cancel-button "${txtback}" --default-item "${nextitem}" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - case ${sel} in - "${txtautoparts} (dos)") - diskpartautodos - nextitem="${txtautoparts} (dos)" - ;; - "${txtautoparts} (gpt)") - diskpartautogpt - nextitem="${txtautoparts} (gpt)" - ;; - "${txtautoparts} (gpt,efi)") - diskpartautoefi - nextitem="${txtautoparts} (gpt,efi)" - ;; - "${txtautoparts} (gpt,bios+efi,noswap)") - diskpartautoefiusb - nextitem="${txtautoparts} (gpt,bios+efi,noswap)" - ;; - "${txteditparts} (cfdisk)") - diskpartcfdisk - nextitem="${txteditparts} (cfdisk)" - ;; - "${txteditparts} (cgdisk)") - diskpartcgdisk - nextitem="${txteditparts} (cgdisk)" - ;; - esac - diskpartmenu "${nextitem}" - fi + if [ "${1}" = "" ]; then + nextitem="." + else + nextitem=${1} + fi + options=() + if [ "${eficomputer}" == "0" ]; then + options+=("${txtautoparts} (gpt)" "") + options+=("${txtautoparts} (dos)" "") + else + options+=("${txtautoparts} (gpt,efi)" "") + options+=("${txtautoparts} (gpt)" "") + options+=("${txtautoparts} (dos)" "") + options+=("${txtautoparts} (gpt,bios+efi,noswap)" "") + fi + options+=("${txteditparts} (cfdisk)" "") + options+=("${txteditparts} (cgdisk)" "") + sel=$(whiptail --backtitle "${apptitle}" --title "${txtdiskpartmenu}" --menu "" --cancel-button "${txtback}" --default-item "${nextitem}" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + case ${sel} in + "${txtautoparts} (dos)") + diskpartautodos + nextitem="${txtautoparts} (dos)" + ;; + "${txtautoparts} (gpt)") + diskpartautogpt + nextitem="${txtautoparts} (gpt)" + ;; + "${txtautoparts} (gpt,efi)") + diskpartautoefi + nextitem="${txtautoparts} (gpt,efi)" + ;; + "${txtautoparts} (gpt,bios+efi,noswap)") + diskpartautoefiusb + nextitem="${txtautoparts} (gpt,bios+efi,noswap)" + ;; + "${txteditparts} (cfdisk)") + diskpartcfdisk + nextitem="${txteditparts} (cfdisk)" + ;; + "${txteditparts} (cgdisk)") + diskpartcgdisk + nextitem="${txteditparts} (cgdisk)" + ;; + esac + diskpartmenu "${nextitem}" + fi } diskpartautodos(){ - device=$(selectdisk "${txtautoparts} (dos)") - if [ "$?" = "0" ]; then - if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (dos)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0) then - clear - echo "${txtautopartclear}" - parted ${device} mklabel msdos - sleep 1 - echo "${txtautopartcreate//%1/boot}" - echo -e "n\np\n\n\n+512M\na\nw" | fdisk ${device} - sleep 1 - echo "${txtautopartcreate//%1/swap}" - swapsize=$(cat /proc/meminfo | grep MemTotal | awk '{ print $2 }') - swapsize=$((${swapsize}/1000))"M" - echo -e "n\np\n\n\n+${swapsize}\nt\n\n82\nw" | fdisk ${device} - sleep 1 - echo "${txtautopartcreate//%1/root}" - echo -e "n\np\n\n\n\nw" | fdisk ${device} - sleep 1 - echo "" - pressanykey - if [ "${device::8}" == "/dev/nvm" ]; then - bootdev=${device}"p1" - swapdev=${device}"p2" - rootdev=${device}"p3" - else - bootdev=${device}"1" - swapdev=${device}"2" - rootdev=${device}"3" - fi - efimode="0" - fi - fi + device=$(selectdisk "${txtautoparts} (dos)") + if [ "$?" = "0" ]; then + if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (dos)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0) then + clear + echo "${txtautopartclear}" + parted ${device} mklabel msdos + sleep 1 + echo "${txtautopartcreate//%1/boot}" + echo -e "n\np\n\n\n+512M\na\nw" | fdisk ${device} + sleep 1 + echo "${txtautopartcreate//%1/swap}" + swapsize=$(cat /proc/meminfo | grep MemTotal | awk '{ print $2 }') + swapsize=$((${swapsize}/1000))"M" + echo -e "n\np\n\n\n+${swapsize}\nt\n\n82\nw" | fdisk ${device} + sleep 1 + echo "${txtautopartcreate//%1/root}" + echo -e "n\np\n\n\n\nw" | fdisk ${device} + sleep 1 + echo "" + pressanykey + if [ "${device::8}" == "/dev/nvm" ]; then + bootdev=${device}"p1" + swapdev=${device}"p2" + rootdev=${device}"p3" + else + bootdev=${device}"1" + swapdev=${device}"2" + rootdev=${device}"3" + fi + efimode="0" + fi + fi } diskpartautogpt(){ - device=$(selectdisk "${txtautoparts} (gpt)") - if [ "$?" = "0" ]; then - if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0) then - clear - echo "${txtautopartclear}" - parted ${device} mklabel gpt - echo "${txtautopartcreate//%1/BIOS boot}" - sgdisk ${device} -n=1:0:+31M -t=1:ef02 - echo "${txtautopartcreate//%1/boot}" - sgdisk ${device} -n=2:0:+512M - echo "${txtautopartcreate//%1/swap}" - swapsize=$(cat /proc/meminfo | grep MemTotal | awk '{ print $2 }') - swapsize=$((${swapsize}/1000))"M" - sgdisk ${device} -n=3:0:+${swapsize} -t=3:8200 - echo "${txtautopartcreate//%1/root}" - sgdisk ${device} -n=4:0:0 - echo "" - pressanykey - if [ "${device::8}" == "/dev/nvm" ]; then - bootdev=${device}"p2" - swapdev=${device}"p3" - rootdev=${device}"p4" - else - bootdev=${device}"2" - swapdev=${device}"3" - rootdev=${device}"4" - fi - efimode="0" - fi - fi + device=$(selectdisk "${txtautoparts} (gpt)") + if [ "$?" = "0" ]; then + if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0) then + clear + echo "${txtautopartclear}" + parted ${device} mklabel gpt + echo "${txtautopartcreate//%1/BIOS boot}" + sgdisk ${device} -n=1:0:+31M -t=1:ef02 + echo "${txtautopartcreate//%1/boot}" + sgdisk ${device} -n=2:0:+512M + echo "${txtautopartcreate//%1/swap}" + swapsize=$(cat /proc/meminfo | grep MemTotal | awk '{ print $2 }') + swapsize=$((${swapsize}/1000))"M" + sgdisk ${device} -n=3:0:+${swapsize} -t=3:8200 + echo "${txtautopartcreate//%1/root}" + sgdisk ${device} -n=4:0:0 + echo "" + pressanykey + if [ "${device::8}" == "/dev/nvm" ]; then + bootdev=${device}"p2" + swapdev=${device}"p3" + rootdev=${device}"p4" + else + bootdev=${device}"2" + swapdev=${device}"3" + rootdev=${device}"4" + fi + efimode="0" + fi + fi } diskpartautoefi(){ - device=$(selectdisk "${txtautoparts} (gpt,efi)") - if [ "$?" = "0" ]; then - if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt,efi)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0) then - clear - echo "${txtautopartclear}" - parted ${device} mklabel gpt - echo "${txtautopartcreate//%1/EFI boot}" - sgdisk ${device} -n=1:0:+1024M -t=1:ef00 - echo "${txtautopartcreate//%1/swap}" - swapsize=$(cat /proc/meminfo | grep MemTotal | awk '{ print $2 }') - swapsize=$((${swapsize}/1000))"M" - sgdisk ${device} -n=3:0:+${swapsize} -t=3:8200 - echo "${txtautopartcreate//%1/root}" - sgdisk ${device} -n=4:0:0 - echo "" - pressanykey - if [ "${device::8}" == "/dev/nvm" ]; then - bootdev=${device}"p1" - swapdev=${device}"p3" - rootdev=${device}"p4" - else - bootdev=${device}"1" - swapdev=${device}"3" - rootdev=${device}"4" - fi - efimode="1" - fi - fi + device=$(selectdisk "${txtautoparts} (gpt,efi)") + if [ "$?" = "0" ]; then + if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt,efi)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0) then + clear + echo "${txtautopartclear}" + parted ${device} mklabel gpt + echo "${txtautopartcreate//%1/EFI boot}" + sgdisk ${device} -n=1:0:+1024M -t=1:ef00 + echo "${txtautopartcreate//%1/swap}" + swapsize=$(cat /proc/meminfo | grep MemTotal | awk '{ print $2 }') + swapsize=$((${swapsize}/1000))"M" + sgdisk ${device} -n=3:0:+${swapsize} -t=3:8200 + echo "${txtautopartcreate//%1/root}" + sgdisk ${device} -n=4:0:0 + echo "" + pressanykey + if [ "${device::8}" == "/dev/nvm" ]; then + bootdev=${device}"p1" + swapdev=${device}"p3" + rootdev=${device}"p4" + else + bootdev=${device}"1" + swapdev=${device}"3" + rootdev=${device}"4" + fi + efimode="1" + fi + fi } diskpartautoefiusb(){ - device=$(selectdisk "${txtautoparts} (gpt,efi)") - if [ "$?" = "0" ]; then - if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt,efi)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0) then - clear - echo "${txtautopartclear}" - parted ${device} mklabel gpt - echo "${txtautopartcreate//%1/EFI boot}" - sgdisk ${device} -n=1:0:+1024M -t=1:ef00 - echo "${txtautopartcreate//%1/BIOS boot}" - sgdisk ${device} -n=3:0:+31M -t=3:ef02 - echo "${txtautopartcreate//%1/root}" - sgdisk ${device} -n=4:0:0 - echo "${txthybridpartcreate}" - echo -e "r\nh\n3\nN\n\nY\nN\nw\nY\n" | gdisk ${device} - echo "" - pressanykey - if [ "${device::8}" == "/dev/nvm" ]; then - bootdev=${device}"p1" - swapdev= - rootdev=${device}"p4" - else - bootdev=${device}"1" - swapdev= - rootdev=${device}"4" - fi - efimode="2" - fi - fi + device=$(selectdisk "${txtautoparts} (gpt,efi)") + if [ "$?" = "0" ]; then + if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt,efi)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0) then + clear + echo "${txtautopartclear}" + parted ${device} mklabel gpt + echo "${txtautopartcreate//%1/EFI boot}" + sgdisk ${device} -n=1:0:+1024M -t=1:ef00 + echo "${txtautopartcreate//%1/BIOS boot}" + sgdisk ${device} -n=3:0:+31M -t=3:ef02 + echo "${txtautopartcreate//%1/root}" + sgdisk ${device} -n=4:0:0 + echo "${txthybridpartcreate}" + echo -e "r\nh\n3\nN\n\nY\nN\nw\nY\n" | gdisk ${device} + echo "" + pressanykey + if [ "${device::8}" == "/dev/nvm" ]; then + bootdev=${device}"p1" + swapdev= + rootdev=${device}"p4" + else + bootdev=${device}"1" + swapdev= + rootdev=${device}"4" + fi + efimode="2" + fi + fi } diskpartcfdisk(){ - device=$( selectdisk "${txteditparts} (cfdisk)" ) - if [ "$?" = "0" ]; then - clear - cfdisk ${device} - fi + device=$( selectdisk "${txteditparts} (cfdisk)" ) + if [ "$?" = "0" ]; then + clear + cfdisk ${device} + fi } diskpartcgdisk(){ - device=$( selectdisk "${txteditparts} (cgdisk)" ) - if [ "$?" = "0" ]; then - clear - cgdisk ${device} - fi + device=$( selectdisk "${txteditparts} (cgdisk)" ) + if [ "$?" = "0" ]; then + clear + cgdisk ${device} + fi } # -------------------------------------------------------- @@ -388,71 +388,71 @@ diskpartcgdisk(){ # -------------------------------------------------------- selectparts(){ - items=$(lsblk -p -n -l -o NAME -e 7,11) - options=() - for item in ${items}; do - options+=("${item}" "") - done + items=$(lsblk -p -n -l -o NAME -e 7,11) + options=() + for item in ${items}; do + options+=("${item}" "") + done - bootdev=$(whiptail --backtitle "${apptitle}" --title "${txtselectpartsmenu}" --menu "${txtselectdevice//%1/boot}" --default-item "${bootdev}" 0 0 0 \ - "none" "-" \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ ! "$?" = "0" ]; then - return 1 - else - if [ "${bootdev}" = "none" ]; then - bootdev= - fi - fi + bootdev=$(whiptail --backtitle "${apptitle}" --title "${txtselectpartsmenu}" --menu "${txtselectdevice//%1/boot}" --default-item "${bootdev}" 0 0 0 \ + "none" "-" \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ ! "$?" = "0" ]; then + return 1 + else + if [ "${bootdev}" = "none" ]; then + bootdev= + fi + fi - swapdev=$(whiptail --backtitle "${apptitle}" --title "${txtselectpartsmenu}" --menu "${txtselectdevice//%1/swap}" --default-item "${swapdev}" 0 0 0 \ - "none" "-" \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ ! "$?" = "0" ]; then - return 1 - else - if [ "${swapdev}" = "none" ]; then - swapdev= - fi - fi + swapdev=$(whiptail --backtitle "${apptitle}" --title "${txtselectpartsmenu}" --menu "${txtselectdevice//%1/swap}" --default-item "${swapdev}" 0 0 0 \ + "none" "-" \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ ! "$?" = "0" ]; then + return 1 + else + if [ "${swapdev}" = "none" ]; then + swapdev= + fi + fi - rootdev=$(whiptail --backtitle "${apptitle}" --title "${txtselectpartsmenu}" --menu "${txtselectdevice//%1/root}" --default-item "${rootdev}" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ ! "$?" = "0" ]; then - return 1 - fi - realrootdev=${rootdev} + rootdev=$(whiptail --backtitle "${apptitle}" --title "${txtselectpartsmenu}" --menu "${txtselectdevice//%1/root}" --default-item "${rootdev}" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ ! "$?" = "0" ]; then + return 1 + fi + realrootdev=${rootdev} - homedev=$(whiptail --backtitle "${apptitle}" --title "${txtselectpartsmenu}" --menu "${txtselectdevice//%1/home}" 0 0 0 \ - "none" "-" \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ ! "$?" = "0" ]; then - return 1 - else - if [ "${homedev}" = "none" ]; then - homedev= - fi - fi + homedev=$(whiptail --backtitle "${apptitle}" --title "${txtselectpartsmenu}" --menu "${txtselectdevice//%1/home}" 0 0 0 \ + "none" "-" \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ ! "$?" = "0" ]; then + return 1 + else + if [ "${homedev}" = "none" ]; then + homedev= + fi + fi - msg="${txtselecteddevices}\n\n" - msg=${msg}"boot : "${bootdev}"\n" - msg=${msg}"swap : "${swapdev}"\n" - msg=${msg}"root : "${rootdev}"\n" - msg=${msg}"home : "${homedev}"\n\n" - if (whiptail --backtitle "${apptitle}" --title "${txtselectpartsmenu}" --yesno "${msg}" 0 0) then - isnvme=0 - if [ "${bootdev::8}" == "/dev/nvm" ]; then - isnvme=1 - fi - if [ "${rootdev::8}" == "/dev/nvm" ]; then - isnvme=1 - fi - mountmenu - fi + msg="${txtselecteddevices}\n\n" + msg=${msg}"boot : "${bootdev}"\n" + msg=${msg}"swap : "${swapdev}"\n" + msg=${msg}"root : "${rootdev}"\n" + msg=${msg}"home : "${homedev}"\n\n" + if (whiptail --backtitle "${apptitle}" --title "${txtselectpartsmenu}" --yesno "${msg}" 0 0) then + isnvme=0 + if [ "${bootdev::8}" == "/dev/nvm" ]; then + isnvme=1 + fi + if [ "${rootdev::8}" == "/dev/nvm" ]; then + isnvme=1 + fi + mountmenu + fi } # -------------------------------------------------------- @@ -460,267 +460,267 @@ selectparts(){ # -------------------------------------------------------- mountmenu(){ - if [ "${1}" = "" ]; then - nextitem="." - else - nextitem=${1} - fi - options=() - options+=("${txtformatdevices}" "") - options+=("${txtmount}" "${txtmountdesc}") - sel=$(whiptail --backtitle "${apptitle}" --title "${txtformatmountmenu}" --menu "" --cancel-button "${txtback}" --default-item "${nextitem}" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - case ${sel} in - "${txtformatdevices}") - formatdevices - nextitem="${txtmount}" - ;; - "${txtmount}") - mountparts - nextitem="${txtmount}" - ;; - esac - mountmenu "${nextitem}" - fi + if [ "${1}" = "" ]; then + nextitem="." + else + nextitem=${1} + fi + options=() + options+=("${txtformatdevices}" "") + options+=("${txtmount}" "${txtmountdesc}") + sel=$(whiptail --backtitle "${apptitle}" --title "${txtformatmountmenu}" --menu "" --cancel-button "${txtback}" --default-item "${nextitem}" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + case ${sel} in + "${txtformatdevices}") + formatdevices + nextitem="${txtmount}" + ;; + "${txtmount}") + mountparts + nextitem="${txtmount}" + ;; + esac + mountmenu "${nextitem}" + fi } formatdevices(){ - if (whiptail --backtitle "${apptitle}" --title "${txtformatdevices}" --yesno "${txtformatdeviceconfirm}" --defaultno 0 0) then - fspkgs="" - if [ ! "${bootdev}" = "" ]; then - formatbootdevice boot ${bootdev} - fi - if [ ! "${swapdev}" = "" ]; then - formatswapdevice swap ${swapdev} - fi - formatdevice root ${rootdev} - if [ ! "${homedev}" = "" ]; then - formatdevice home ${homedev} - fi - fi + if (whiptail --backtitle "${apptitle}" --title "${txtformatdevices}" --yesno "${txtformatdeviceconfirm}" --defaultno 0 0) then + fspkgs="" + if [ ! "${bootdev}" = "" ]; then + formatbootdevice boot ${bootdev} + fi + if [ ! "${swapdev}" = "" ]; then + formatswapdevice swap ${swapdev} + fi + formatdevice root ${rootdev} + if [ ! "${homedev}" = "" ]; then + formatdevice home ${homedev} + fi + fi } formatbootdevice(){ - options=() - if [ "${efimode}" == "1" ]||[ "${efimode}" = "2" ]; then - options+=("fat32" "(EFI)") - fi - options+=("ext2" "") - options+=("ext3" "") - options+=("ext4" "") - if [ ! "${efimode}" = "1" ]&&[ ! "${efimode}" = "2" ]; then - options+=("fat32" "(EFI)") - fi - sel=$(whiptail --backtitle "${apptitle}" --title "${txtformatdevice}" --menu "${txtselectpartformat//%1/${1} (${2})}" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ ! "$?" = "0" ]; then - return 1 - fi - clear - echo "${txtformatingpart//%1/${2}} ${sel}" - echo "----------------------------------------------" - case ${sel} in - ext2) - echo "mkfs.ext2 ${2}" - mkfs.ext2 ${2} - ;; - ext3) - echo "mkfs.ext3 ${2}" - mkfs.ext3 ${2} - ;; - ext4) - echo "mkfs.ext4 ${2}" - mkfs.ext4 ${2} - ;; - fat32) - fspkgs="${fspkgs[@]} dosfstools" - echo "mkfs.fat ${2}" - mkfs.fat ${2} - ;; - esac - echo "" - pressanykey + options=() + if [ "${efimode}" == "1" ]||[ "${efimode}" = "2" ]; then + options+=("fat32" "(EFI)") + fi + options+=("ext2" "") + options+=("ext3" "") + options+=("ext4" "") + if [ ! "${efimode}" = "1" ]&&[ ! "${efimode}" = "2" ]; then + options+=("fat32" "(EFI)") + fi + sel=$(whiptail --backtitle "${apptitle}" --title "${txtformatdevice}" --menu "${txtselectpartformat//%1/${1} (${2})}" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ ! "$?" = "0" ]; then + return 1 + fi + clear + echo "${txtformatingpart//%1/${2}} ${sel}" + echo "----------------------------------------------" + case ${sel} in + ext2) + echo "mkfs.ext2 ${2}" + mkfs.ext2 ${2} + ;; + ext3) + echo "mkfs.ext3 ${2}" + mkfs.ext3 ${2} + ;; + ext4) + echo "mkfs.ext4 ${2}" + mkfs.ext4 ${2} + ;; + fat32) + fspkgs="${fspkgs[@]} dosfstools" + echo "mkfs.fat ${2}" + mkfs.fat ${2} + ;; + esac + echo "" + pressanykey } formatswapdevice(){ - options=() - options+=("swap" "") - sel=$(whiptail --backtitle "${apptitle}" --title "${txtformatdevice}" --menu "${txtselectpartformat//%1/${1} (${2})}" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ ! "$?" = "0" ]; then - return 1 - fi - clear - echo "${txtformatingpart//%1/${swapdev}} swap" - echo "----------------------------------------------------" - case ${sel} in - swap) - echo "mkswap ${swapdev}" - mkswap ${swapdev} - echo "" - pressanykey - ;; - esac - clear + options=() + options+=("swap" "") + sel=$(whiptail --backtitle "${apptitle}" --title "${txtformatdevice}" --menu "${txtselectpartformat//%1/${1} (${2})}" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ ! "$?" = "0" ]; then + return 1 + fi + clear + echo "${txtformatingpart//%1/${swapdev}} swap" + echo "----------------------------------------------------" + case ${sel} in + swap) + echo "mkswap ${swapdev}" + mkswap ${swapdev} + echo "" + pressanykey + ;; + esac + clear } formatdevice(){ - options=() - options+=("btrfs" "") - options+=("ext4" "") - options+=("ext3" "") - options+=("ext2" "") - options+=("xfs" "") - options+=("f2fs" "") - options+=("jfs" "") - options+=("reiserfs" "") - if [ ! "${3}" = "noluks" ]; then - options+=("luks" "encrypted") - fi - sel=$(whiptail --backtitle "${apptitle}" --title "${txtformatdevice}" --menu "${txtselectpartformat//%1/${1} (${2})}" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ ! "$?" = "0" ]; then - return 1 - fi - clear - echo "${txtformatingpart//%1/${2}} ${sel}" - echo "----------------------------------------------" - case ${sel} in - btrfs) - fspkgs="${fspkgs[@]} btrfs-progs" - echo "mkfs.btrfs -f ${2}" - mkfs.btrfs -f ${2} - if [ "${1}" = "root" ]; then - echo "mount ${2} /mnt" - echo "btrfs subvolume create /mnt/root" - echo "btrfs subvolume set-default /mnt/root" - echo "umount /mnt" - mount ${2} /mnt - btrfs subvolume create /mnt/root - btrfs subvolume set-default /mnt/root - umount /mnt - fi - ;; - ext4) - echo "mkfs.ext4 ${2}" - mkfs.ext4 ${2} - ;; - ext3) - echo "mkfs.ext3 ${2}" - mkfs.ext3 ${2} - ;; - ext2) - echo "mkfs.ext2 ${2}" - mkfs.ext2 ${2} - ;; - xfs) - fspkgs="${fspkgs[@]} xfsprogs" - echo "mkfs.xfs -f ${2}" - mkfs.xfs -f ${2} - ;; - f2fs) - fspkgs="${fspkgs[@]} f2fs-tools" - echo "mkfs.f2fs $2" - mkfs.f2fs $2 - ;; - jfs) - fspkgs="${fspkgs[@]} jfsutils" - echo "mkfs.xfs -f ${2}" - mkfs.jfs -f ${2} - ;; - reiserfs) - fspkgs="${fspkgs[@]} reiserfsprogs" - echo "mkfs.reiserfs -f ${2}" - mkfs.reiserfs -f ${2} - ;; - luks) - echo "${txtcreateluksdevice}" - echo "cryptsetup luksFormat ${2}" - cryptsetup luksFormat ${2} - if [ ! "$?" = "0" ]; then - pressanykey - return 1 - fi - pressanykey - echo "" - echo "${txtopenluksdevice}" - echo "cryptsetup luksOpen ${2} ${1}" - cryptsetup luksOpen ${2} ${1} - if [ ! "$?" = "0" ]; then - pressanykey - return 1 - fi - pressanykey - options=() - options+=("normal" "") - options+=("fast" "") - sel=$(whiptail --backtitle "${apptitle}" --title "${txtformatdevice}" --menu "Wipe device ?" --cancel-button="${txtignore}" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - case ${sel} in - normal) - echo "dd if=/dev/zero of=/dev/mapper/${1}" - dd if=/dev/zero of=/dev/mapper/${1} & PID=$! &>/dev/null - ;; - fast) - echo "dd if=/dev/zero of=/dev/mapper/${1} bs=60M" - dd if=/dev/zero of=/dev/mapper/${1} bs=60M & PID=$! &>/dev/null - ;; - esac - clear - sleep 1 - while kill -USR1 ${PID} &>/dev/null - do - sleep 1 - done - fi - echo "" - pressanykey - formatdevice ${1} /dev/mapper/${1} noluks - if [ "${1}" = "root" ]; then - realrootdev=${rootdev} - rootdev=/dev/mapper/${1} - luksroot=1 - luksrootuuid=$(cryptsetup luksUUID ${2}) - else - case ${1} in - home) homedev=/dev/mapper/${1} ;; - esac - luksdrive=1 - crypttab="\n${1} UUID=$(cryptsetup luksUUID ${2}) none" - fi - echo "" - echo "${txtluksdevicecreated}" - ;; - esac - echo "" - pressanykey + options=() + options+=("btrfs" "") + options+=("ext4" "") + options+=("ext3" "") + options+=("ext2" "") + options+=("xfs" "") + options+=("f2fs" "") + options+=("jfs" "") + options+=("reiserfs" "") + if [ ! "${3}" = "noluks" ]; then + options+=("luks" "encrypted") + fi + sel=$(whiptail --backtitle "${apptitle}" --title "${txtformatdevice}" --menu "${txtselectpartformat//%1/${1} (${2})}" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ ! "$?" = "0" ]; then + return 1 + fi + clear + echo "${txtformatingpart//%1/${2}} ${sel}" + echo "----------------------------------------------" + case ${sel} in + btrfs) + fspkgs="${fspkgs[@]} btrfs-progs" + echo "mkfs.btrfs -f ${2}" + mkfs.btrfs -f ${2} + if [ "${1}" = "root" ]; then + echo "mount ${2} /mnt" + echo "btrfs subvolume create /mnt/root" + echo "btrfs subvolume set-default /mnt/root" + echo "umount /mnt" + mount ${2} /mnt + btrfs subvolume create /mnt/root + btrfs subvolume set-default /mnt/root + umount /mnt + fi + ;; + ext4) + echo "mkfs.ext4 ${2}" + mkfs.ext4 ${2} + ;; + ext3) + echo "mkfs.ext3 ${2}" + mkfs.ext3 ${2} + ;; + ext2) + echo "mkfs.ext2 ${2}" + mkfs.ext2 ${2} + ;; + xfs) + fspkgs="${fspkgs[@]} xfsprogs" + echo "mkfs.xfs -f ${2}" + mkfs.xfs -f ${2} + ;; + f2fs) + fspkgs="${fspkgs[@]} f2fs-tools" + echo "mkfs.f2fs $2" + mkfs.f2fs $2 + ;; + jfs) + fspkgs="${fspkgs[@]} jfsutils" + echo "mkfs.xfs -f ${2}" + mkfs.jfs -f ${2} + ;; + reiserfs) + fspkgs="${fspkgs[@]} reiserfsprogs" + echo "mkfs.reiserfs -f ${2}" + mkfs.reiserfs -f ${2} + ;; + luks) + echo "${txtcreateluksdevice}" + echo "cryptsetup luksFormat ${2}" + cryptsetup luksFormat ${2} + if [ ! "$?" = "0" ]; then + pressanykey + return 1 + fi + pressanykey + echo "" + echo "${txtopenluksdevice}" + echo "cryptsetup luksOpen ${2} ${1}" + cryptsetup luksOpen ${2} ${1} + if [ ! "$?" = "0" ]; then + pressanykey + return 1 + fi + pressanykey + options=() + options+=("normal" "") + options+=("fast" "") + sel=$(whiptail --backtitle "${apptitle}" --title "${txtformatdevice}" --menu "Wipe device ?" --cancel-button="${txtignore}" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + case ${sel} in + normal) + echo "dd if=/dev/zero of=/dev/mapper/${1}" + dd if=/dev/zero of=/dev/mapper/${1} & PID=$! &>/dev/null + ;; + fast) + echo "dd if=/dev/zero of=/dev/mapper/${1} bs=60M" + dd if=/dev/zero of=/dev/mapper/${1} bs=60M & PID=$! &>/dev/null + ;; + esac + clear + sleep 1 + while kill -USR1 ${PID} &>/dev/null + do + sleep 1 + done + fi + echo "" + pressanykey + formatdevice ${1} /dev/mapper/${1} noluks + if [ "${1}" = "root" ]; then + realrootdev=${rootdev} + rootdev=/dev/mapper/${1} + luksroot=1 + luksrootuuid=$(cryptsetup luksUUID ${2}) + else + case ${1} in + home) homedev=/dev/mapper/${1} ;; + esac + luksdrive=1 + crypttab="\n${1} UUID=$(cryptsetup luksUUID ${2}) none" + fi + echo "" + echo "${txtluksdevicecreated}" + ;; + esac + echo "" + pressanykey } mountparts(){ - clear - echo "mount ${rootdev} /mnt" - mount ${rootdev} /mnt - echo "mkdir /mnt/{boot,home}" - mkdir /mnt/{boot,home} 2>/dev/null - if [ ! "${bootdev}" = "" ]; then - echo "mount ${bootdev} /mnt/boot" - mount ${bootdev} /mnt/boot - fi - if [ ! "${swapdev}" = "" ]; then - echo "swapon ${swapdev}" - swapon ${swapdev} - fi - if [ ! "${homedev}" = "" ]; then - echo "mount ${homedev} /mnt/home" - mount ${homedev} /mnt/home - fi - pressanykey - installmenu + clear + echo "mount ${rootdev} /mnt" + mount ${rootdev} /mnt + echo "mkdir /mnt/{boot,home}" + mkdir /mnt/{boot,home} 2>/dev/null + if [ ! "${bootdev}" = "" ]; then + echo "mount ${bootdev} /mnt/boot" + mount ${bootdev} /mnt/boot + fi + if [ ! "${swapdev}" = "" ]; then + echo "swapon ${swapdev}" + swapon ${swapdev} + fi + if [ ! "${homedev}" = "" ]; then + echo "mount ${homedev} /mnt/home" + mount ${homedev} /mnt/home + fi + pressanykey + installmenu } # -------------------------------------------------------- @@ -728,148 +728,148 @@ mountparts(){ # -------------------------------------------------------- installmenu(){ - if [ "${1}" = "" ]; then - nextitem="${txtinstallarchlinux}" - else - nextitem=${1} - fi - options=() - options+=("${txtselectmirrorsbycountry}" "(${txtoptional})") - options+=("${txteditmirrorlist}" "(${txtoptional})") - options+=("${txtinstallarchlinux}" "pacstrap") - options+=("${txtconfigarchlinux}" "") - sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallmenu}" --menu "" --cancel-button "${txtunmount}" --default-item "${nextitem}" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - case ${sel} in - "${txtselectmirrorsbycountry}") - selectmirrorsbycountry - nextitem="${txtinstallarchlinux}" - ;; - "${txteditmirrorlist}") - ${EDITOR} /etc/pacman.d/mirrorlist - nextitem="${txtinstallarchlinux}" - ;; - "${txtinstallarchlinux}") - if(installbase) then - nextitem="${txtconfigarchlinux}" - fi - ;; - "${txtconfigarchlinux}") - archmenu - nextitem="${txtconfigarchlinux}" - ;; - esac - installmenu "${nextitem}" - else - unmountdevices - fi + if [ "${1}" = "" ]; then + nextitem="${txtinstallarchlinux}" + else + nextitem=${1} + fi + options=() + options+=("${txtselectmirrorsbycountry}" "(${txtoptional})") + options+=("${txteditmirrorlist}" "(${txtoptional})") + options+=("${txtinstallarchlinux}" "pacstrap") + options+=("${txtconfigarchlinux}" "") + sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallmenu}" --menu "" --cancel-button "${txtunmount}" --default-item "${nextitem}" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + case ${sel} in + "${txtselectmirrorsbycountry}") + selectmirrorsbycountry + nextitem="${txtinstallarchlinux}" + ;; + "${txteditmirrorlist}") + ${EDITOR} /etc/pacman.d/mirrorlist + nextitem="${txtinstallarchlinux}" + ;; + "${txtinstallarchlinux}") + if(installbase) then + nextitem="${txtconfigarchlinux}" + fi + ;; + "${txtconfigarchlinux}") + archmenu + nextitem="${txtconfigarchlinux}" + ;; + esac + installmenu "${nextitem}" + else + unmountdevices + fi } selectmirrorsbycountry() { - if [[ ! -f /etc/pacman.d/mirrorlist.backup ]]; then - cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup - fi - items=$( sed -n "/^##.*/N; {s/^## \(.*\)\nServer.*/\1/p}" < /etc/pacman.d/mirrorlist.backup | sort -u ) - options=() - IFS_ORIG=$IFS - IFS=$'\n' - for item in ${items}; do - options+=("${item}" "") - done - IFS=$IFS_ORIG - country=$(whiptail --backtitle "${APPTITLE}" --title "${txtselectcountry}" --menu "" 0 0 0 "${options[@]}" 3>&1 1>&2 2>&3) - if [ "$?" != "0" ]; then - return 1 - fi - sed "s/^\(Server .*\)/\#\1/;/^## $country/N; {s/^\(## .*\n\)\#Server \(.*\)/\1Server \2/}" < /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist + if [[ ! -f /etc/pacman.d/mirrorlist.backup ]]; then + cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup + fi + items=$( sed -n "/^##.*/N; {s/^## \(.*\)\nServer.*/\1/p}" < /etc/pacman.d/mirrorlist.backup | sort -u ) + options=() + IFS_ORIG=$IFS + IFS=$'\n' + for item in ${items}; do + options+=("${item}" "") + done + IFS=$IFS_ORIG + country=$(whiptail --backtitle "${APPTITLE}" --title "${txtselectcountry}" --menu "" 0 0 0 "${options[@]}" 3>&1 1>&2 2>&3) + if [ "$?" != "0" ]; then + return 1 + fi + sed "s/^\(Server .*\)/\#\1/;/^## $country/N; {s/^\(## .*\n\)\#Server \(.*\)/\1Server \2/}" < /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist } installbase(){ - pkgs="base" - options=() - options+=("linux" "") - options+=("linux-lts" "") - options+=("linux-zen" "") - options+=("linux-hardened" "") - sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallarchlinuxkernel}" --menu "" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - pkgs+=" ${sel}" - else - return 1 - fi - - options=() - options+=("linux-firmware" "(${txtoptional})" on) - sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallarchlinuxfirmwares}" --checklist "" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ ! "$?" = "0" ]; then - return 1 - fi - for itm in $sel; do - pkgs="$pkgs $(echo $itm | sed 's/"//g')" - done + pkgs="base" + options=() + options+=("linux" "") + options+=("linux-lts" "") + options+=("linux-zen" "") + options+=("linux-hardened" "") + sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallarchlinuxkernel}" --menu "" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + pkgs+=" ${sel}" + else + return 1 + fi + + options=() + options+=("linux-firmware" "(${txtoptional})" on) + sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallarchlinuxfirmwares}" --checklist "" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ ! "$?" = "0" ]; then + return 1 + fi + for itm in $sel; do + pkgs="$pkgs $(echo $itm | sed 's/"//g')" + done - options=() - if [[ "${fspkgs}" == *"dosfstools"* ]]; then - options+=("dosfstools" "" on) - else - options+=("dosfstools" "" off) - fi - if [[ "${fspkgs}" == *"btrfs-progs"* ]]; then - options+=("btrfs-progs" "" on) - else - options+=("btrfs-progs" "" off) - fi - if [[ "${fspkgs}" == *"xfsprogs"* ]]; then - options+=("xfsprogs" "" on) - else - options+=("xfsprogs" "" off) - fi - if [[ "${fspkgs}" == *"f2fs-tools"* ]]; then - options+=("f2fs-tools" "" on) - else - options+=("f2fs-tools" "" off) - fi - if [[ "${fspkgs}" == *"jfsutils"* ]]; then - options+=("jfsutils" "" on) - else - options+=("jfsutils" "" off) - fi - if [[ "${fspkgs}" == *"reiserfsprogs"* ]]; then - options+=("reiserfsprogs" "" on) - else - options+=("reiserfsprogs" "" off) - fi - sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallarchlinuxfilesystems}" --checklist "" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ ! "$?" = "0" ]; then - return 1 - fi - for itm in $sel; do - pkgs="$pkgs $(echo $itm | sed 's/"//g')" - done - - clear - echo "pacstrap /mnt ${pkgs}" - pacstrap /mnt ${pkgs} - pressanykey + options=() + if [[ "${fspkgs}" == *"dosfstools"* ]]; then + options+=("dosfstools" "" on) + else + options+=("dosfstools" "" off) + fi + if [[ "${fspkgs}" == *"btrfs-progs"* ]]; then + options+=("btrfs-progs" "" on) + else + options+=("btrfs-progs" "" off) + fi + if [[ "${fspkgs}" == *"xfsprogs"* ]]; then + options+=("xfsprogs" "" on) + else + options+=("xfsprogs" "" off) + fi + if [[ "${fspkgs}" == *"f2fs-tools"* ]]; then + options+=("f2fs-tools" "" on) + else + options+=("f2fs-tools" "" off) + fi + if [[ "${fspkgs}" == *"jfsutils"* ]]; then + options+=("jfsutils" "" on) + else + options+=("jfsutils" "" off) + fi + if [[ "${fspkgs}" == *"reiserfsprogs"* ]]; then + options+=("reiserfsprogs" "" on) + else + options+=("reiserfsprogs" "" off) + fi + sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallarchlinuxfilesystems}" --checklist "" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ ! "$?" = "0" ]; then + return 1 + fi + for itm in $sel; do + pkgs="$pkgs $(echo $itm | sed 's/"//g')" + done + + clear + echo "pacstrap /mnt ${pkgs}" + pacstrap /mnt ${pkgs} + pressanykey } unmountdevices(){ - clear - echo "umount -R /mnt" - umount -R /mnt - if [ ! "${swapdev}" = "" ]; then - echo "swapoff ${swapdev}" - swapoff ${swapdev} - fi - pressanykey + clear + echo "umount -R /mnt" + umount -R /mnt + if [ ! "${swapdev}" = "" ]; then + echo "swapoff ${swapdev}" + swapoff ${swapdev} + fi + pressanykey } # -------------------------------------------------------- @@ -877,887 +877,887 @@ unmountdevices(){ # -------------------------------------------------------- archmenu(){ - if [ "${1}" = "" ]; then - nextitem="." - else - nextitem=${1} - fi - options=() - options+=("${txtsethostname}" "/etc/hostname") - options+=("${txtsetkeymap}" "/etc/vconsole.conf") - options+=("${txtsetfont}" "/etc/vconsole.conf (${txtoptional})") - options+=("${txtsetlocale}" "/etc/locale.conf, /etc/locale.gen") - options+=("${txtsettime}" "/etc/localtime") - options+=("${txtsetrootpassword}" "") - options+=("${txtgenerate//%1/fstab}" "") - if [ "${luksdrive}" = "1" ]; then - options+=("${txtgenerate//%1/crypttab}" "") - fi - if [ "${luksroot}" = "1" ]; then - options+=("${txtgenerate//%1/mkinitcpio.conf-luks}" "(encrypt hooks)") - fi - if [ "${isnvme}" = "1" ]; then - options+=("${txtgenerate//%1/mkinitcpio.conf-nvme}" "(nvme module)") - fi - options+=("${txtedit//%1/fstab}" "(${txtoptional})") - options+=("${txtedit//%1/crypttab}" "(${txtoptional})") - options+=("${txtedit//%1/mkinitcpio.conf}" "(${txtoptional})") - options+=("${txtedit//%1/mirrorlist}" "(${txtoptional})") - options+=("${txtbootloader}" "") - options+=("${txtenable//%1/dhcpcd}" "systemctl enable dhcpcd") - options+=("archdi" "${txtarchdidesc}") - sel=$(whiptail --backtitle "${apptitle}" --title "${txtarchinstallmenu}" --menu "" --cancel-button "${txtback}" --default-item "${nextitem}" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - case ${sel} in - "${txtsethostname}") - archsethostname - nextitem="${txtsetkeymap}" - ;; - "${txtsetkeymap}") - archsetkeymap - nextitem="${txtsetlocale}" - ;; - "${txtsetfont}") - archsetfont - nextitem="${txtsetlocale}" - ;; - "${txtsetlocale}") - archsetlocale - nextitem="${txtsettime}" - ;; - "${txtsettime}") - archsettime - nextitem="${txtsetrootpassword}" - ;; - "${txtsetrootpassword}") - archsetrootpassword - nextitem="${txtgenerate//%1/fstab}" - ;; - "${txtgenerate//%1/fstab}") - archgenfstabmenu - if [ "${luksdrive}" = "1" ]; then - nextitem="${txtgenerate//%1/crypttab}" - else - if [ "${luksroot}" = "1" ]; then - nextitem="${txtgenerate//%1/mkinitcpio.conf-luks}" - else - if [ "${isnvme}" = "1" ]; then - nextitem="${txtgenerate//%1/mkinitcpio.conf-nvme}" - else - nextitem="${txtbootloader}" - fi - fi - fi - ;; - "${txtgenerate//%1/crypttab}") - archgencrypttab - if [ "${luksroot}" = "1" ]; then - nextitem="${txtgenerate//%1/mkinitcpio.conf-luks}" - else - if [ "${isnvme}" = "1" ]; then - nextitem="${txtgenerate//%1/mkinitcpio.conf-nvme}" - else - nextitem="${txtbootloader}" - fi - fi - ;; - "${txtgenerate//%1/mkinitcpio.conf-luks}") - archgenmkinitcpioluks - if [ "${isnvme}" = "1" ]; then - nextitem="${txtgenerate//%1/mkinitcpio.conf-nvme}" - else - nextitem="${txtbootloader}" - fi - ;; - "${txtgenerate//%1/mkinitcpio.conf-nvme}") - archgenmkinitcpionvme - nextitem="${txtbootloader}" - ;; - "${txtedit//%1/fstab}") - ${EDITOR} /mnt/etc/fstab - nextitem="${txtedit//%1/fstab}" - ;; - "${txtedit//%1/crypttab}") - ${EDITOR} /mnt/etc/crypttab - nextitem="${txtedit//%1/crypttab}" - ;; - "${txtedit//%1/mkinitcpio.conf}") - archeditmkinitcpio - nextitem="${txtedit//%1/mkinitcpio.conf}" - ;; - "${txtedit//%1/mirrorlist}") - ${EDITOR} /mnt/etc/pacman.d/mirrorlist - nextitem="${txtedit//%1/mirrorlist}" - ;; - "${txtbootloader}") - archbootloadermenu - nextitem="${txtenable//%1/dhcpcd}" - ;; - "${txtenable//%1/dhcpcd}") - archenabledhcpcd - nextitem="archdi" - ;; - "archdi") - installarchdi - nextitem="archdi" - ;; - esac - archmenu "${nextitem}" - fi + if [ "${1}" = "" ]; then + nextitem="." + else + nextitem=${1} + fi + options=() + options+=("${txtsethostname}" "/etc/hostname") + options+=("${txtsetkeymap}" "/etc/vconsole.conf") + options+=("${txtsetfont}" "/etc/vconsole.conf (${txtoptional})") + options+=("${txtsetlocale}" "/etc/locale.conf, /etc/locale.gen") + options+=("${txtsettime}" "/etc/localtime") + options+=("${txtsetrootpassword}" "") + options+=("${txtgenerate//%1/fstab}" "") + if [ "${luksdrive}" = "1" ]; then + options+=("${txtgenerate//%1/crypttab}" "") + fi + if [ "${luksroot}" = "1" ]; then + options+=("${txtgenerate//%1/mkinitcpio.conf-luks}" "(encrypt hooks)") + fi + if [ "${isnvme}" = "1" ]; then + options+=("${txtgenerate//%1/mkinitcpio.conf-nvme}" "(nvme module)") + fi + options+=("${txtedit//%1/fstab}" "(${txtoptional})") + options+=("${txtedit//%1/crypttab}" "(${txtoptional})") + options+=("${txtedit//%1/mkinitcpio.conf}" "(${txtoptional})") + options+=("${txtedit//%1/mirrorlist}" "(${txtoptional})") + options+=("${txtbootloader}" "") + options+=("${txtenable//%1/dhcpcd}" "systemctl enable dhcpcd") + options+=("archdi" "${txtarchdidesc}") + sel=$(whiptail --backtitle "${apptitle}" --title "${txtarchinstallmenu}" --menu "" --cancel-button "${txtback}" --default-item "${nextitem}" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + case ${sel} in + "${txtsethostname}") + archsethostname + nextitem="${txtsetkeymap}" + ;; + "${txtsetkeymap}") + archsetkeymap + nextitem="${txtsetlocale}" + ;; + "${txtsetfont}") + archsetfont + nextitem="${txtsetlocale}" + ;; + "${txtsetlocale}") + archsetlocale + nextitem="${txtsettime}" + ;; + "${txtsettime}") + archsettime + nextitem="${txtsetrootpassword}" + ;; + "${txtsetrootpassword}") + archsetrootpassword + nextitem="${txtgenerate//%1/fstab}" + ;; + "${txtgenerate//%1/fstab}") + archgenfstabmenu + if [ "${luksdrive}" = "1" ]; then + nextitem="${txtgenerate//%1/crypttab}" + else + if [ "${luksroot}" = "1" ]; then + nextitem="${txtgenerate//%1/mkinitcpio.conf-luks}" + else + if [ "${isnvme}" = "1" ]; then + nextitem="${txtgenerate//%1/mkinitcpio.conf-nvme}" + else + nextitem="${txtbootloader}" + fi + fi + fi + ;; + "${txtgenerate//%1/crypttab}") + archgencrypttab + if [ "${luksroot}" = "1" ]; then + nextitem="${txtgenerate//%1/mkinitcpio.conf-luks}" + else + if [ "${isnvme}" = "1" ]; then + nextitem="${txtgenerate//%1/mkinitcpio.conf-nvme}" + else + nextitem="${txtbootloader}" + fi + fi + ;; + "${txtgenerate//%1/mkinitcpio.conf-luks}") + archgenmkinitcpioluks + if [ "${isnvme}" = "1" ]; then + nextitem="${txtgenerate//%1/mkinitcpio.conf-nvme}" + else + nextitem="${txtbootloader}" + fi + ;; + "${txtgenerate//%1/mkinitcpio.conf-nvme}") + archgenmkinitcpionvme + nextitem="${txtbootloader}" + ;; + "${txtedit//%1/fstab}") + ${EDITOR} /mnt/etc/fstab + nextitem="${txtedit//%1/fstab}" + ;; + "${txtedit//%1/crypttab}") + ${EDITOR} /mnt/etc/crypttab + nextitem="${txtedit//%1/crypttab}" + ;; + "${txtedit//%1/mkinitcpio.conf}") + archeditmkinitcpio + nextitem="${txtedit//%1/mkinitcpio.conf}" + ;; + "${txtedit//%1/mirrorlist}") + ${EDITOR} /mnt/etc/pacman.d/mirrorlist + nextitem="${txtedit//%1/mirrorlist}" + ;; + "${txtbootloader}") + archbootloadermenu + nextitem="${txtenable//%1/dhcpcd}" + ;; + "${txtenable//%1/dhcpcd}") + archenabledhcpcd + nextitem="archdi" + ;; + "archdi") + installarchdi + nextitem="archdi" + ;; + esac + archmenu "${nextitem}" + fi } archchroot(){ - echo "arch-chroot /mnt /root" - cp ${0} /mnt/root - chmod 755 /mnt/root/$(basename "${0}") - arch-chroot /mnt /root/$(basename "${0}") --chroot ${1} ${2} - rm /mnt/root/$(basename "${0}") - echo "exit" + echo "arch-chroot /mnt /root" + cp ${0} /mnt/root + chmod 755 /mnt/root/$(basename "${0}") + arch-chroot /mnt /root/$(basename "${0}") --chroot ${1} ${2} + rm /mnt/root/$(basename "${0}") + echo "exit" } archsethostname(){ - hostname=$(whiptail --backtitle "${apptitle}" --title "${txtsethostname}" --inputbox "" 0 0 "archlinux" 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - clear - echo "echo \"${hostname}\" > /mnt/etc/hostname" - echo "${hostname}" > /mnt/etc/hostname - pressanykey - fi + hostname=$(whiptail --backtitle "${apptitle}" --title "${txtsethostname}" --inputbox "" 0 0 "archlinux" 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + clear + echo "echo \"${hostname}\" > /mnt/etc/hostname" + echo "${hostname}" > /mnt/etc/hostname + pressanykey + fi } archsetkeymap(){ - #items=$(localectl list-keymaps) - #options=() - #for item in ${items}; do - # options+=("${item}" "") - #done - items=$(find /usr/share/kbd/keymaps/ -type f -printf "%f\n" | sort -V) - options=() - defsel="" - for item in ${items}; do - if [ "${item%%.*}" == "${keymap}" ]; then - defsel="${item%%.*}" - fi - options+=("${item%%.*}" "") - done - keymap=$(whiptail --backtitle "${apptitle}" --title "${txtsetkeymap}" --menu "" --default-item "${defsel}" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - clear - echo "echo \"KEYMAP=${keymap}\" > /mnt/etc/vconsole.conf" - echo "KEYMAP=${keymap}" > /mnt/etc/vconsole.conf - pressanykey - fi + #items=$(localectl list-keymaps) + #options=() + #for item in ${items}; do + # options+=("${item}" "") + #done + items=$(find /usr/share/kbd/keymaps/ -type f -printf "%f\n" | sort -V) + options=() + defsel="" + for item in ${items}; do + if [ "${item%%.*}" == "${keymap}" ]; then + defsel="${item%%.*}" + fi + options+=("${item%%.*}" "") + done + keymap=$(whiptail --backtitle "${apptitle}" --title "${txtsetkeymap}" --menu "" --default-item "${defsel}" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + clear + echo "echo \"KEYMAP=${keymap}\" > /mnt/etc/vconsole.conf" + echo "KEYMAP=${keymap}" > /mnt/etc/vconsole.conf + pressanykey + fi } archsetfont(){ - items=$(find /usr/share/kbd/consolefonts/*.psfu.gz -printf "%f\n") + items=$(find /usr/share/kbd/consolefonts/*.psfu.gz -printf "%f\n") - options=() - for item in ${items}; do - options+=("${item%%.*}" "") - done - vcfont=$(whiptail --backtitle "${apptitle}" --title "${txtsetfont} (${txtoptional})" --menu "" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - clear - echo "echo \"FONT=${vcfont}\" >> /mnt/etc/vconsole.conf" - echo "FONT=${vcfont}" >> /mnt/etc/vconsole.conf - pressanykey - fi + options=() + for item in ${items}; do + options+=("${item%%.*}" "") + done + vcfont=$(whiptail --backtitle "${apptitle}" --title "${txtsetfont} (${txtoptional})" --menu "" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + clear + echo "echo \"FONT=${vcfont}\" >> /mnt/etc/vconsole.conf" + echo "FONT=${vcfont}" >> /mnt/etc/vconsole.conf + pressanykey + fi } archsetlocale(){ - items=$(ls /usr/share/i18n/locales) - options=() - defsel="" - for item in ${items}; do - if [ "${defsel}" == "" ]&&[ "${keymap::2}" == "${item::2}" ]; then - defsel="${item}" - fi - options+=("${item}" "") - done - locale=$(whiptail --backtitle "${apptitle}" --title "${txtsetlocale}" --menu "" --default-item "${defsel}" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - clear - echo "echo \"LANG=${locale}.UTF-8\" > /mnt/etc/locale.conf" - echo "LANG=${locale}.UTF-8" > /mnt/etc/locale.conf - echo "echo \"LC_COLLATE=C\" >> /mnt/etc/locale.conf" - echo "LC_COLLATE=C" >> /mnt/etc/locale.conf - echo "sed -i '/#${locale}.UTF-8/s/^#//g' /mnt/etc/locale.gen" - sed -i '/#'${locale}'.UTF-8/s/^#//g' /mnt/etc/locale.gen - archchroot setlocale - pressanykey - fi + items=$(ls /usr/share/i18n/locales) + options=() + defsel="" + for item in ${items}; do + if [ "${defsel}" == "" ]&&[ "${keymap::2}" == "${item::2}" ]; then + defsel="${item}" + fi + options+=("${item}" "") + done + locale=$(whiptail --backtitle "${apptitle}" --title "${txtsetlocale}" --menu "" --default-item "${defsel}" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + clear + echo "echo \"LANG=${locale}.UTF-8\" > /mnt/etc/locale.conf" + echo "LANG=${locale}.UTF-8" > /mnt/etc/locale.conf + echo "echo \"LC_COLLATE=C\" >> /mnt/etc/locale.conf" + echo "LC_COLLATE=C" >> /mnt/etc/locale.conf + echo "sed -i '/#${locale}.UTF-8/s/^#//g' /mnt/etc/locale.gen" + sed -i '/#'${locale}'.UTF-8/s/^#//g' /mnt/etc/locale.gen + archchroot setlocale + pressanykey + fi } archsetlocalechroot(){ - echo "locale-gen" - locale-gen - exit + echo "locale-gen" + locale-gen + exit } archsettime(){ - items=$(ls -l /mnt/usr/share/zoneinfo/ | grep '^d' | gawk -F':[0-9]* ' '/:/{print $2}') - options=() - for item in ${items}; do - options+=("${item}" "") - done + items=$(ls -l /mnt/usr/share/zoneinfo/ | grep '^d' | gawk -F':[0-9]* ' '/:/{print $2}') + options=() + for item in ${items}; do + options+=("${item}" "") + done - timezone=$(whiptail --backtitle "${apptitle}" --title "${txtsettime}" --menu "" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ ! "$?" = "0" ]; then - return 1 - fi + timezone=$(whiptail --backtitle "${apptitle}" --title "${txtsettime}" --menu "" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ ! "$?" = "0" ]; then + return 1 + fi - items=$(ls /mnt/usr/share/zoneinfo/${timezone}/) - options=() - for item in ${items}; do - options+=("${item}" "") - done + items=$(ls /mnt/usr/share/zoneinfo/${timezone}/) + options=() + for item in ${items}; do + options+=("${item}" "") + done - timezone=${timezone}/$(whiptail --backtitle "${apptitle}" --title "${txtsettime}" --menu "" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ ! "$?" = "0" ]; then - return 1 - fi + timezone=${timezone}/$(whiptail --backtitle "${apptitle}" --title "${txtsettime}" --menu "" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ ! "$?" = "0" ]; then + return 1 + fi - clear - echo "ln -sf /mnt/usr/share/zoneinfo/${timezone} /mnt/etc/localtime" - ln -sf /usr/share/zoneinfo/${timezone} /mnt/etc/localtime - pressanykey + clear + echo "ln -sf /mnt/usr/share/zoneinfo/${timezone} /mnt/etc/localtime" + ln -sf /usr/share/zoneinfo/${timezone} /mnt/etc/localtime + pressanykey - if (whiptail --backtitle "${apptitle}" --title "${txtsettime}" --yesno "${txtuseutcclock}" 0 0) then - clear - archchroot settimeutc - else - clear - archchroot settimelocal - fi + if (whiptail --backtitle "${apptitle}" --title "${txtsettime}" --yesno "${txtuseutcclock}" 0 0) then + clear + archchroot settimeutc + else + clear + archchroot settimelocal + fi - pressanykey + pressanykey } archsettimeutcchroot(){ - echo "hwclock --systohc --utc" - hwclock --systohc --utc - exit + echo "hwclock --systohc --utc" + hwclock --systohc --utc + exit } archsettimelocalchroot(){ - echo "hwclock --systohc --localtime" - hwclock --systohc --localtime - exit + echo "hwclock --systohc --localtime" + hwclock --systohc --localtime + exit } archsetrootpassword(){ - clear - archchroot setrootpassword - pressanykey + clear + archchroot setrootpassword + pressanykey } archsetrootpasswordchroot(){ - echo "passwd root" - passwd root - exit + echo "passwd root" + passwd root + exit } archgenfstabmenu(){ - options=() - options+=("UUID" "genfstab -U") - options+=("LABEL" "genfstab -L") - options+=("PARTUUID" "genfstab -t PARTUUID") - options+=("PARTLABEL" "genfstab -t PARTLABEL") - sel=$(whiptail --backtitle "${apptitle}" --title "${txtgenerate//%1/fstab}" --menu "" --cancel-button "${txtback}" --default-item "${nextitem}" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - case ${sel} in - "UUID") - clear - echo "genfstab -U -p /mnt > /mnt/etc/fstab" - genfstab -U -p /mnt > /mnt/etc/fstab - ;; - "LABEL") - clear - echo "genfstab -L -p /mnt > /mnt/etc/fstab" - genfstab -L -p /mnt > /mnt/etc/fstab - ;; - "PARTUUID") - clear - echo "genfstab -t PARTUUID -p /mnt > /mnt/etc/fstab" - genfstab -t PARTUUID -p /mnt > /mnt/etc/fstab - ;; - "PARTLABEL") - clear - echo "genfstab -t PARTLABEL -p /mnt > /mnt/etc/fstab" - genfstab -t PARTLABEL -p /mnt > /mnt/etc/fstab - ;; - esac - fi - pressanykey + options=() + options+=("UUID" "genfstab -U") + options+=("LABEL" "genfstab -L") + options+=("PARTUUID" "genfstab -t PARTUUID") + options+=("PARTLABEL" "genfstab -t PARTLABEL") + sel=$(whiptail --backtitle "${apptitle}" --title "${txtgenerate//%1/fstab}" --menu "" --cancel-button "${txtback}" --default-item "${nextitem}" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + case ${sel} in + "UUID") + clear + echo "genfstab -U -p /mnt > /mnt/etc/fstab" + genfstab -U -p /mnt > /mnt/etc/fstab + ;; + "LABEL") + clear + echo "genfstab -L -p /mnt > /mnt/etc/fstab" + genfstab -L -p /mnt > /mnt/etc/fstab + ;; + "PARTUUID") + clear + echo "genfstab -t PARTUUID -p /mnt > /mnt/etc/fstab" + genfstab -t PARTUUID -p /mnt > /mnt/etc/fstab + ;; + "PARTLABEL") + clear + echo "genfstab -t PARTLABEL -p /mnt > /mnt/etc/fstab" + genfstab -t PARTLABEL -p /mnt > /mnt/etc/fstab + ;; + esac + fi + pressanykey } archgencrypttab(){ - clear - echo "echo -e \"${crypttab}\" >> /mnt/etc/crypttab" - echo -e "${crypttab}" >> /mnt/etc/crypttab - pressanykey + clear + echo "echo -e \"${crypttab}\" >> /mnt/etc/crypttab" + echo -e "${crypttab}" >> /mnt/etc/crypttab + pressanykey } archgenmkinitcpioluks(){ - clear - echo "sed -i \"s/block filesystems/block encrypt filesystems/g\" /mnt/etc/mkinitcpio.conf" - sed -i "s/block filesystems/block encrypt filesystems/g" /mnt/etc/mkinitcpio.conf - archchroot genmkinitcpio - pressanykey + clear + echo "sed -i \"s/block filesystems/block encrypt filesystems/g\" /mnt/etc/mkinitcpio.conf" + sed -i "s/block filesystems/block encrypt filesystems/g" /mnt/etc/mkinitcpio.conf + archchroot genmkinitcpio + pressanykey } archgenmkinitcpionvme(){ - clear - echo "sed -i \"s/MODULES=()/MODULES=(nvme)/g\" /mnt/etc/mkinitcpio.conf" - sed -i "s/MODULES=()/MODULES=(nvme)/g" /mnt/etc/mkinitcpio.conf - archchroot genmkinitcpio - pressanykey + clear + echo "sed -i \"s/MODULES=()/MODULES=(nvme)/g\" /mnt/etc/mkinitcpio.conf" + sed -i "s/MODULES=()/MODULES=(nvme)/g" /mnt/etc/mkinitcpio.conf + archchroot genmkinitcpio + pressanykey } archeditmkinitcpio(){ - ${EDITOR} /mnt/etc/mkinitcpio.conf - if (whiptail --backtitle "${apptitle}" --title "${txtedit//%1/mkinitcpio.conf}" --yesno "${txtgenerate//%1/mkinitcpio} ?" 0 0) then - clear - archchroot genmkinitcpio - pressanykey - fi + ${EDITOR} /mnt/etc/mkinitcpio.conf + if (whiptail --backtitle "${apptitle}" --title "${txtedit//%1/mkinitcpio.conf}" --yesno "${txtgenerate//%1/mkinitcpio} ?" 0 0) then + clear + archchroot genmkinitcpio + pressanykey + fi } archgenmkinitcpiochroot(){ - echo "mkinitcpio -p linux" - mkinitcpio -p linux - exit + echo "mkinitcpio -p linux" + mkinitcpio -p linux + exit } archbootloadermenu(){ - options=() - options+=("grub" "") - if [ "${efimode}" == "1" ]; then - options+=("systemd-boot" "") - options+=("refind" "") - fi - if [ "${efimode}" != "2" ]; then - options+=("syslinux" "") - fi - sel=$(whiptail --backtitle "${apptitle}" --title "${txtbootloadermenu}" --menu "" --cancel-button "${txtback}" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - case ${sel} in - "grub") archbootloadergrubmenu;; - "systemd-boot")archbootloadersystemdbmenu;; - "refind") archbootloaderrefindmenu;; - "syslinux")archbootloadersyslinuxbmenu;; - esac - fi + options=() + options+=("grub" "") + if [ "${efimode}" == "1" ]; then + options+=("systemd-boot" "") + options+=("refind" "") + fi + if [ "${efimode}" != "2" ]; then + options+=("syslinux" "") + fi + sel=$(whiptail --backtitle "${apptitle}" --title "${txtbootloadermenu}" --menu "" --cancel-button "${txtback}" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + case ${sel} in + "grub") archbootloadergrubmenu;; + "systemd-boot")archbootloadersystemdbmenu;; + "refind") archbootloaderrefindmenu;; + "syslinux")archbootloadersyslinuxbmenu;; + esac + fi } archbootloadergrubmenu(){ - if [ "${1}" = "" ]; then - nextblitem="." - else - nextblitem=${1} - fi - options=() - options+=("${txtinstall//%1/grub}" "pacstrap grub (efibootmgr), grub-mkconfig") - options+=("${txtedit//%1/grub}" "(${txtoptional})") - options+=("${txtinstall//%1/bootloader}" "grub-install") - sel=$(whiptail --backtitle "${apptitle}" --title "${txtbootloadergrubmenu}" --menu "" --cancel-button "${txtback}" --default-item "${nextblitem}" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - case ${sel} in - "${txtinstall//%1/grub}") - archgrubinstall - nextblitem="${txtinstall//%1/bootloader}" - ;; - "${txtedit//%1/grub}") - ${EDITOR} /mnt/etc/default/grub - if (whiptail --backtitle "${apptitle}" --title "${txtedit//%1/grub}" --yesno "${txtrungrubmakeconfig}" 0 0) then - clear - archchroot grubinstall - pressanykey - fi - nextblitem="${txtinstall//%1/bootloader}" - ;; - "${txtinstall//%1/bootloader}") - archgrubinstallbootloader - nextblitem="${txtinstall//%1/bootloader}" - ;; - esac - archbootloadergrubmenu "${nextblitem}" - fi + if [ "${1}" = "" ]; then + nextblitem="." + else + nextblitem=${1} + fi + options=() + options+=("${txtinstall//%1/grub}" "pacstrap grub (efibootmgr), grub-mkconfig") + options+=("${txtedit//%1/grub}" "(${txtoptional})") + options+=("${txtinstall//%1/bootloader}" "grub-install") + sel=$(whiptail --backtitle "${apptitle}" --title "${txtbootloadergrubmenu}" --menu "" --cancel-button "${txtback}" --default-item "${nextblitem}" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + case ${sel} in + "${txtinstall//%1/grub}") + archgrubinstall + nextblitem="${txtinstall//%1/bootloader}" + ;; + "${txtedit//%1/grub}") + ${EDITOR} /mnt/etc/default/grub + if (whiptail --backtitle "${apptitle}" --title "${txtedit//%1/grub}" --yesno "${txtrungrubmakeconfig}" 0 0) then + clear + archchroot grubinstall + pressanykey + fi + nextblitem="${txtinstall//%1/bootloader}" + ;; + "${txtinstall//%1/bootloader}") + archgrubinstallbootloader + nextblitem="${txtinstall//%1/bootloader}" + ;; + esac + archbootloadergrubmenu "${nextblitem}" + fi } archgrubinstall(){ - clear - echo "pacstrap /mnt grub" - pacstrap /mnt grub - pressanykey + clear + echo "pacstrap /mnt grub" + pacstrap /mnt grub + pressanykey - if [ "${eficomputer}" == "1" ]; then - if [ "${efimode}" == "1" ]||[ "${efimode}" == "2" ]; then - if (whiptail --backtitle "${apptitle}" --title "${txtinstall//%1/efibootmgr}" --yesno "${txtefibootmgr}" 0 0) then - clear - echo "pacstrap /mnt efibootmgr" - pacstrap /mnt efibootmgr - pressanykey - fi - else - if (whiptail --backtitle "${apptitle}" --title "${txtinstall//%1/efibootmgr}" --yesno "${txtefibootmgr}" --defaultno 0 0) then - clear - echo "pacstrap /mnt efibootmgr" - pacstrap /mnt efibootmgr - pressanykey - fi - fi - fi + if [ "${eficomputer}" == "1" ]; then + if [ "${efimode}" == "1" ]||[ "${efimode}" == "2" ]; then + if (whiptail --backtitle "${apptitle}" --title "${txtinstall//%1/efibootmgr}" --yesno "${txtefibootmgr}" 0 0) then + clear + echo "pacstrap /mnt efibootmgr" + pacstrap /mnt efibootmgr + pressanykey + fi + else + if (whiptail --backtitle "${apptitle}" --title "${txtinstall//%1/efibootmgr}" --yesno "${txtefibootmgr}" --defaultno 0 0) then + clear + echo "pacstrap /mnt efibootmgr" + pacstrap /mnt efibootmgr + pressanykey + fi + fi + fi - if [ "${luksroot}" = "1" ]; then - if (whiptail --backtitle "${apptitle}" --title "${txtinstall//%1/grub}" --yesno "${txtgrubluksdetected}" 0 0) then - clear - echo "sed -i /GRUB_CMDLINE_LINUX=/c\GRUB_CMDLINE_LINUX=\\\"cryptdevice=/dev/disk/by-uuid/${luksrootuuid}:root\\\" /mnt/etc/default/grub" - sed -i /GRUB_CMDLINE_LINUX=/c\GRUB_CMDLINE_LINUX=\"cryptdevice=/dev/disk/by-uuid/${luksrootuuid}:root\" /mnt/etc/default/grub - pressanykey - fi - fi + if [ "${luksroot}" = "1" ]; then + if (whiptail --backtitle "${apptitle}" --title "${txtinstall//%1/grub}" --yesno "${txtgrubluksdetected}" 0 0) then + clear + echo "sed -i /GRUB_CMDLINE_LINUX=/c\GRUB_CMDLINE_LINUX=\\\"cryptdevice=/dev/disk/by-uuid/${luksrootuuid}:root\\\" /mnt/etc/default/grub" + sed -i /GRUB_CMDLINE_LINUX=/c\GRUB_CMDLINE_LINUX=\"cryptdevice=/dev/disk/by-uuid/${luksrootuuid}:root\" /mnt/etc/default/grub + pressanykey + fi + fi - clear - archchroot grubinstall - pressanykey + clear + archchroot grubinstall + pressanykey } archgrubinstallchroot(){ - echo "mkdir /boot/grub" - echo "grub-mkconfig -o /boot/grub/grub.cfg" - mkdir /boot/grub - grub-mkconfig -o /boot/grub/grub.cfg - exit + echo "mkdir /boot/grub" + echo "grub-mkconfig -o /boot/grub/grub.cfg" + mkdir /boot/grub + grub-mkconfig -o /boot/grub/grub.cfg + exit } archgrubinstallbootloader(){ - device=$( selectdisk "${txtinstall//%1/bootloader}" ) - if [ "$?" = "0" ]; then - if [ "${eficomputer}" == "1" ]; then - options=() - if [ "${efimode}" = "1" ]; then - options+=("EFI" "") - options+=("BIOS" "") - options+=("BIOS+EFI" "") - elif [ "${efimode}" = "2" ]; then - options+=("BIOS+EFI" "") - options+=("BIOS" "") - options+=("EFI" "") - else - options+=("BIOS" "") - options+=("EFI" "") - options+=("BIOS+EFI" "") - fi - sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstall//%1/bootloader}" --menu "" --cancel-button "${txtback}" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - clear - case ${sel} in - "BIOS") archchroot grubbootloaderinstall ${device};; - "EFI") archchroot grubbootloaderefiinstall ${device};; - "BIOS+EFI") archchroot grubbootloaderefiusbinstall ${device};; - esac - pressanykey - fi - else - clear - archchroot grubbootloaderinstall ${device} - pressanykey - fi - fi + device=$( selectdisk "${txtinstall//%1/bootloader}" ) + if [ "$?" = "0" ]; then + if [ "${eficomputer}" == "1" ]; then + options=() + if [ "${efimode}" = "1" ]; then + options+=("EFI" "") + options+=("BIOS" "") + options+=("BIOS+EFI" "") + elif [ "${efimode}" = "2" ]; then + options+=("BIOS+EFI" "") + options+=("BIOS" "") + options+=("EFI" "") + else + options+=("BIOS" "") + options+=("EFI" "") + options+=("BIOS+EFI" "") + fi + sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstall//%1/bootloader}" --menu "" --cancel-button "${txtback}" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + clear + case ${sel} in + "BIOS") archchroot grubbootloaderinstall ${device};; + "EFI") archchroot grubbootloaderefiinstall ${device};; + "BIOS+EFI") archchroot grubbootloaderefiusbinstall ${device};; + esac + pressanykey + fi + else + clear + archchroot grubbootloaderinstall ${device} + pressanykey + fi + fi } archgrubinstallbootloaderchroot(){ - if [ ! "${1}" = "none" ]; then - echo "grub-install --target=i386-pc --recheck ${1}" - grub-install --target=i386-pc --recheck ${1} - fi - exit + if [ ! "${1}" = "none" ]; then + echo "grub-install --target=i386-pc --recheck ${1}" + grub-install --target=i386-pc --recheck ${1} + fi + exit } archgrubinstallbootloaderefichroot(){ - if [ ! "${1}" = "none" ]; then - echo "grub-install --target=x86_64-efi --efi-directory=/boot --recheck ${1}" - grub-install --target=x86_64-efi --efi-directory=/boot --recheck ${1} - isvbox=$(lspci | grep "VirtualBox G") - if [ "${isvbox}" ]; then - echo "VirtualBox detected, creating startup.nsh..." - echo "\EFI\arch\grubx64.efi" > /boot/startup.nsh - fi - fi - exit + if [ ! "${1}" = "none" ]; then + echo "grub-install --target=x86_64-efi --efi-directory=/boot --recheck ${1}" + grub-install --target=x86_64-efi --efi-directory=/boot --recheck ${1} + isvbox=$(lspci | grep "VirtualBox G") + if [ "${isvbox}" ]; then + echo "VirtualBox detected, creating startup.nsh..." + echo "\EFI\arch\grubx64.efi" > /boot/startup.nsh + fi + fi + exit } archgrubinstallbootloaderefiusbchroot(){ - if [ ! "${1}" = "none" ]; then - echo "grub-install --target=i386-pc --recheck ${1}" - grub-install --target=i386-pc --recheck ${1} - echo "grub-install --target=x86_64-efi --efi-directory=/boot --removable --recheck ${1}" - grub-install --target=x86_64-efi --efi-directory=/boot --removable --recheck ${1} - isvbox=$(lspci | grep "VirtualBox G") - if [ "${isvbox}" ]; then - echo "VirtualBox detected, creating startup.nsh..." - echo "\EFI\arch\grubx64.efi" > /boot/startup.nsh - fi - fi - exit + if [ ! "${1}" = "none" ]; then + echo "grub-install --target=i386-pc --recheck ${1}" + grub-install --target=i386-pc --recheck ${1} + echo "grub-install --target=x86_64-efi --efi-directory=/boot --removable --recheck ${1}" + grub-install --target=x86_64-efi --efi-directory=/boot --removable --recheck ${1} + isvbox=$(lspci | grep "VirtualBox G") + if [ "${isvbox}" ]; then + echo "VirtualBox detected, creating startup.nsh..." + echo "\EFI\arch\grubx64.efi" > /boot/startup.nsh + fi + fi + exit } archbootloadersyslinuxbmenu(){ - if [ "${1}" = "" ]; then - nextblitem="." - else - nextblitem=${1} - fi - options=() - options+=("${txtinstall//%1/syslinux}" "pacstrap syslinux (gptfdisk,mtools)") - options+=("${txtedit//%1/syslinux}" "(${txtoptional})") - options+=("${txtinstall//%1/bootloader}" "syslinux-install_update") - sel=$(whiptail --backtitle "${apptitle}" --title "${txtbootloadersyslinuxmenu}" --menu "" --cancel-button "${txtback}" --default-item "${nextblitem}" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - case ${sel} in - "${txtinstall//%1/syslinux}") - archsyslinuxinstall - nextblitem="${txtinstall//%1/bootloader}" - ;; - "${txtedit//%1/syslinux}") - ${EDITOR} /mnt/boot/syslinux/syslinux.cfg - nextblitem="${txtinstall//%1/bootloader}" - ;; - "${txtinstall//%1/bootloader}") - archsyslinuxinstallbootloader - nextblitem="${txtinstall//%1/bootloader}" - ;; - esac - archbootloadersyslinuxbmenu "${nextblitem}" - fi + if [ "${1}" = "" ]; then + nextblitem="." + else + nextblitem=${1} + fi + options=() + options+=("${txtinstall//%1/syslinux}" "pacstrap syslinux (gptfdisk,mtools)") + options+=("${txtedit//%1/syslinux}" "(${txtoptional})") + options+=("${txtinstall//%1/bootloader}" "syslinux-install_update") + sel=$(whiptail --backtitle "${apptitle}" --title "${txtbootloadersyslinuxmenu}" --menu "" --cancel-button "${txtback}" --default-item "${nextblitem}" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + case ${sel} in + "${txtinstall//%1/syslinux}") + archsyslinuxinstall + nextblitem="${txtinstall//%1/bootloader}" + ;; + "${txtedit//%1/syslinux}") + ${EDITOR} /mnt/boot/syslinux/syslinux.cfg + nextblitem="${txtinstall//%1/bootloader}" + ;; + "${txtinstall//%1/bootloader}") + archsyslinuxinstallbootloader + nextblitem="${txtinstall//%1/bootloader}" + ;; + esac + archbootloadersyslinuxbmenu "${nextblitem}" + fi } archsyslinuxinstall(){ - clear + clear - if [ "${efimode}" == "1" ]||[ "${efimode}" == "2" ]; then - echo "${txtsyslinuxaddefibootmgr}" - additionalpkg=${additionalpkg}"efibootmgr " - fi + if [ "${efimode}" == "1" ]||[ "${efimode}" == "2" ]; then + echo "${txtsyslinuxaddefibootmgr}" + additionalpkg=${additionalpkg}"efibootmgr " + fi - if [ "${isnvme}" = "1" ]; then - if [ "$(parted ${realrootdev::(-2)} print|grep gpt)" != "" ]; then - echo "${txtsyslinuxaddgptfdisk}" - additionalpkg=${additionalpkg}"gptfdisk " - fi - else - if [ "$(parted ${realrootdev::8} print|grep gpt)" != "" ]; then - echo "${txtsyslinuxaddgptfdisk}" - additionalpkg=${additionalpkg}"gptfdisk " - fi - fi + if [ "${isnvme}" = "1" ]; then + if [ "$(parted ${realrootdev::(-2)} print|grep gpt)" != "" ]; then + echo "${txtsyslinuxaddgptfdisk}" + additionalpkg=${additionalpkg}"gptfdisk " + fi + else + if [ "$(parted ${realrootdev::8} print|grep gpt)" != "" ]; then + echo "${txtsyslinuxaddgptfdisk}" + additionalpkg=${additionalpkg}"gptfdisk " + fi + fi - if [ "${bootdev}" != "" ]; then - if [ "$(parted ${bootdev} print|grep fat)" != "" ]; then - echo "${txtsyslinuxaddmtools}" - additionalpkg=${additionalpkg}"mtools " - fi - fi + if [ "${bootdev}" != "" ]; then + if [ "$(parted ${bootdev} print|grep fat)" != "" ]; then + echo "${txtsyslinuxaddmtools}" + additionalpkg=${additionalpkg}"mtools " + fi + fi - echo "pacstrap /mnt syslinux ${additionalpkg}" - pacstrap /mnt syslinux ${additionalpkg} - pressanykey + echo "pacstrap /mnt syslinux ${additionalpkg}" + pacstrap /mnt syslinux ${additionalpkg} + pressanykey - clear - echo "Updating /boot/syslinux/syslinux.cfg" - if [ "${luksroot}" = "1" ]; then - echo "sed -i \"/APPEND\ root=/c\ APPEND root=/dev/mapper/root cryptdevice=${realrootdev}:root rw\" /mnt/boot/syslinux/syslinux.cfg" - sed -i "/APPEND\ root=/c\ APPEND root=/dev/mapper/root cryptdevice=${realrootdev}:root\ rw" /mnt/boot/syslinux/syslinux.cfg - else - echo "sed -i \"/APPEND\ root=/c\ APPEND root=${rootdev} rw\" /mnt/boot/syslinux/syslinux.cfg" - sed -i "/APPEND\ root=/c\ APPEND root=${rootdev}\ rw" /mnt/boot/syslinux/syslinux.cfg - fi + clear + echo "Updating /boot/syslinux/syslinux.cfg" + if [ "${luksroot}" = "1" ]; then + echo "sed -i \"/APPEND\ root=/c\ APPEND root=/dev/mapper/root cryptdevice=${realrootdev}:root rw\" /mnt/boot/syslinux/syslinux.cfg" + sed -i "/APPEND\ root=/c\ APPEND root=/dev/mapper/root cryptdevice=${realrootdev}:root\ rw" /mnt/boot/syslinux/syslinux.cfg + else + echo "sed -i \"/APPEND\ root=/c\ APPEND root=${rootdev} rw\" /mnt/boot/syslinux/syslinux.cfg" + sed -i "/APPEND\ root=/c\ APPEND root=${rootdev}\ rw" /mnt/boot/syslinux/syslinux.cfg + fi - pressanykey + pressanykey } archsyslinuxinstallbootloader(){ - clear - if [ "${efimode}" == "1" ]||[ "${efimode}" == "2" ]; then - archchroot syslinuxbootloaderefiinstall ${bootdev} - else - archchroot syslinuxbootloaderinstall ${bootdev} - fi - pressanykey + clear + if [ "${efimode}" == "1" ]||[ "${efimode}" == "2" ]; then + archchroot syslinuxbootloaderefiinstall ${bootdev} + else + archchroot syslinuxbootloaderinstall ${bootdev} + fi + pressanykey } archsyslinuxinstallbootloaderchroot(){ - if [ ! "${1}" = "none" ]; then - echo "syslinux-install_update -i -a -m" - syslinux-install_update -i -a -m - fi - exit + if [ ! "${1}" = "none" ]; then + echo "syslinux-install_update -i -a -m" + syslinux-install_update -i -a -m + fi + exit } archsyslinuxinstallbootloaderefichroot(){ - if [ ! "${1}" = "none" ]; then - echo "cp -r /usr/lib/syslinux/efi64/* /boot/syslinux" - cp -r /usr/lib/syslinux/efi64/* /boot/syslinux - if [ "${1::8}" == "/dev/nvm" ]; then - echo "efibootmgr --create --disk ${1::(-2)} --part ${1:(-1)} --loader /syslinux/syslinux.efi --label "Syslinux" --verbose" - efibootmgr --create --disk ${1::(-2)} --part ${1:(-1)} --loader /syslinux/syslinux.efi --label "Syslinux" --verbose - else - echo "efibootmgr --create --disk ${1::8} --part ${1:(-1)} --loader /syslinux/syslinux.efi --label "Syslinux" --verbose" - efibootmgr --create --disk ${1::8} --part ${1:(-1)} --loader /syslinux/syslinux.efi --label "Syslinux" --verbose - fi - isvbox=$(lspci | grep "VirtualBox G") - if [ "${isvbox}" ]; then - echo "VirtualBox detected, creating startup.nsh..." - echo "\syslinux\syslinux.efi" > /boot/startup.nsh - fi - fi - exit + if [ ! "${1}" = "none" ]; then + echo "cp -r /usr/lib/syslinux/efi64/* /boot/syslinux" + cp -r /usr/lib/syslinux/efi64/* /boot/syslinux + if [ "${1::8}" == "/dev/nvm" ]; then + echo "efibootmgr --create --disk ${1::(-2)} --part ${1:(-1)} --loader /syslinux/syslinux.efi --label "Syslinux" --verbose" + efibootmgr --create --disk ${1::(-2)} --part ${1:(-1)} --loader /syslinux/syslinux.efi --label "Syslinux" --verbose + else + echo "efibootmgr --create --disk ${1::8} --part ${1:(-1)} --loader /syslinux/syslinux.efi --label "Syslinux" --verbose" + efibootmgr --create --disk ${1::8} --part ${1:(-1)} --loader /syslinux/syslinux.efi --label "Syslinux" --verbose + fi + isvbox=$(lspci | grep "VirtualBox G") + if [ "${isvbox}" ]; then + echo "VirtualBox detected, creating startup.nsh..." + echo "\syslinux\syslinux.efi" > /boot/startup.nsh + fi + fi + exit } archbootloadersystemdbmenu(){ - if [ "${1}" = "" ]; then - nextblitem="." - else - nextblitem=${1} - fi - options=() - options+=("${txtinstall//%1/systemd-boot}" "bootctl install") - options+=("${txtedit//%1/loader.conf}" "(${txtoptional})") - options+=("${txtedit//%1/entries}" "(${txtoptional})") - sel=$(whiptail --backtitle "${apptitle}" --title "${txtbootloadersystemdmenu}" --menu "" --cancel-button "${txtback}" --default-item "${nextblitem}" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - case ${sel} in - "${txtinstall//%1/systemd-boot}") - archsystemdinstall - nextblitem="${txtinstall//%1/loader.conf}" - ;; - "${txtedit//%1/loader.conf}") - ${EDITOR} /mnt/boot/loader/loader.conf - nextblitem="${txtedit//%1/entries}" - ;; - "${txtedit//%1/entries}") - ${EDITOR} /mnt/boot/loader/entries/* - nextblitem="${txtedit//%1/entries}" - ;; - esac - archbootloadersystemdbmenu "${nextblitem}" - fi + if [ "${1}" = "" ]; then + nextblitem="." + else + nextblitem=${1} + fi + options=() + options+=("${txtinstall//%1/systemd-boot}" "bootctl install") + options+=("${txtedit//%1/loader.conf}" "(${txtoptional})") + options+=("${txtedit//%1/entries}" "(${txtoptional})") + sel=$(whiptail --backtitle "${apptitle}" --title "${txtbootloadersystemdmenu}" --menu "" --cancel-button "${txtback}" --default-item "${nextblitem}" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + case ${sel} in + "${txtinstall//%1/systemd-boot}") + archsystemdinstall + nextblitem="${txtinstall//%1/loader.conf}" + ;; + "${txtedit//%1/loader.conf}") + ${EDITOR} /mnt/boot/loader/loader.conf + nextblitem="${txtedit//%1/entries}" + ;; + "${txtedit//%1/entries}") + ${EDITOR} /mnt/boot/loader/entries/* + nextblitem="${txtedit//%1/entries}" + ;; + esac + archbootloadersystemdbmenu "${nextblitem}" + fi } archsystemdinstall(){ - clear - archchroot systemdbootloaderinstall ${realrootdev} + clear + archchroot systemdbootloaderinstall ${realrootdev} - partuuid=$(blkid -s PARTUUID -o value ${realrootdev}) - parttype=$(blkid -s TYPE -o value ${rootdev}) + partuuid=$(blkid -s PARTUUID -o value ${realrootdev}) + parttype=$(blkid -s TYPE -o value ${rootdev}) - echo "cp /mnt/usr/share/systemd/bootctl/arch.conf /mnt/boot/loader/entries" - echo "echo \"timeout 2\" >> /mnt/boot/loader/loader.conf" - echo "cp /mnt/usr/share/systemd/bootctl/loader.conf /mnt/boot/loader" - if [ "${luksroot}" = "1" ]; then - cryptuuid=$(blkid -s UUID -o value ${realrootdev}) - echo "sed -i \"s/PARTUUID=XXXX/\\/dev\\/mapper\\/root/\" /mnt/boot/loader/entries/arch.conf" - echo "sed -i \"s/XXXX/${parttype}/\" /mnt/boot/loader/entries/arch.conf" - echo "sed -i \"s/root=/cryptdevice=UUID=${cryptuuid}:root root=/\" /mnt/boot/loader/entries/arch.conf" - else - echo "sed -i \"s/PARTUUID=XXXX/PARTUUID=${partuuid}/\" /mnt/boot/loader/entries/arch.conf" - echo "sed -i \"s/XXXX/${parttype}/\" /mnt/boot/loader/entries/arch.conf" - fi - echo "cp /mnt/boot/loader/entries/arch.conf /mnt/boot/loader/entries/arch-fallback.conf" - echo "sed -i \"s/Arch Linux/Arch Linux Fallback/\" /mnt/boot/loader/entries/arch-fallback.conf" - echo "sed -i \"s/initramfs-linux/initramfs-linux-fallback/\" /mnt/boot/loader/entries/arch-fallback.conf" + echo "cp /mnt/usr/share/systemd/bootctl/arch.conf /mnt/boot/loader/entries" + echo "echo \"timeout 2\" >> /mnt/boot/loader/loader.conf" + echo "cp /mnt/usr/share/systemd/bootctl/loader.conf /mnt/boot/loader" + if [ "${luksroot}" = "1" ]; then + cryptuuid=$(blkid -s UUID -o value ${realrootdev}) + echo "sed -i \"s/PARTUUID=XXXX/\\/dev\\/mapper\\/root/\" /mnt/boot/loader/entries/arch.conf" + echo "sed -i \"s/XXXX/${parttype}/\" /mnt/boot/loader/entries/arch.conf" + echo "sed -i \"s/root=/cryptdevice=UUID=${cryptuuid}:root root=/\" /mnt/boot/loader/entries/arch.conf" + else + echo "sed -i \"s/PARTUUID=XXXX/PARTUUID=${partuuid}/\" /mnt/boot/loader/entries/arch.conf" + echo "sed -i \"s/XXXX/${parttype}/\" /mnt/boot/loader/entries/arch.conf" + fi + echo "cp /mnt/boot/loader/entries/arch.conf /mnt/boot/loader/entries/arch-fallback.conf" + echo "sed -i \"s/Arch Linux/Arch Linux Fallback/\" /mnt/boot/loader/entries/arch-fallback.conf" + echo "sed -i \"s/initramfs-linux/initramfs-linux-fallback/\" /mnt/boot/loader/entries/arch-fallback.conf" - cp /mnt/usr/share/systemd/bootctl/loader.conf /mnt/boot/loader - echo "timeout 2" >> /mnt/boot/loader/loader.conf - cp /mnt/usr/share/systemd/bootctl/arch.conf /mnt/boot/loader/entries + cp /mnt/usr/share/systemd/bootctl/loader.conf /mnt/boot/loader + echo "timeout 2" >> /mnt/boot/loader/loader.conf + cp /mnt/usr/share/systemd/bootctl/arch.conf /mnt/boot/loader/entries - if [ "${luksroot}" = "1" ]; then - sed -i "s/PARTUUID=XXXX/\/dev\/mapper\/root/" /mnt/boot/loader/entries/arch.conf - sed -i "s/XXXX/${parttype}/" /mnt/boot/loader/entries/arch.conf - sed -i "s/root=/cryptdevice=UUID=${cryptuuid}:root root=/" /mnt/boot/loader/entries/arch.conf - else - sed -i "s/PARTUUID=XXXX/PARTUUID=${partuuid}/" /mnt/boot/loader/entries/arch.conf - sed -i "s/XXXX/${parttype}/" /mnt/boot/loader/entries/arch.conf - fi + if [ "${luksroot}" = "1" ]; then + sed -i "s/PARTUUID=XXXX/\/dev\/mapper\/root/" /mnt/boot/loader/entries/arch.conf + sed -i "s/XXXX/${parttype}/" /mnt/boot/loader/entries/arch.conf + sed -i "s/root=/cryptdevice=UUID=${cryptuuid}:root root=/" /mnt/boot/loader/entries/arch.conf + else + sed -i "s/PARTUUID=XXXX/PARTUUID=${partuuid}/" /mnt/boot/loader/entries/arch.conf + sed -i "s/XXXX/${parttype}/" /mnt/boot/loader/entries/arch.conf + fi - cp /mnt/boot/loader/entries/arch.conf /mnt/boot/loader/entries/arch-fallback.conf - sed -i "s/Arch Linux/Arch Linux Fallback/" /mnt/boot/loader/entries/arch-fallback.conf - sed -i "s/initramfs-linux/initramfs-linux-fallback/" /mnt/boot/loader/entries/arch-fallback.conf + cp /mnt/boot/loader/entries/arch.conf /mnt/boot/loader/entries/arch-fallback.conf + sed -i "s/Arch Linux/Arch Linux Fallback/" /mnt/boot/loader/entries/arch-fallback.conf + sed -i "s/initramfs-linux/initramfs-linux-fallback/" /mnt/boot/loader/entries/arch-fallback.conf - pressanykey + pressanykey } archsystemdinstallchroot(){ - echo "bootctl --path=/boot install" - bootctl --path=/boot install - isvbox=$(lspci | grep "VirtualBox G") - if [ "${isvbox}" ]; then - echo "VirtualBox detected, creating startup.nsh..." - echo "\EFI\systemd\systemd-bootx64.efi" > /boot/startup.nsh - fi + echo "bootctl --path=/boot install" + bootctl --path=/boot install + isvbox=$(lspci | grep "VirtualBox G") + if [ "${isvbox}" ]; then + echo "VirtualBox detected, creating startup.nsh..." + echo "\EFI\systemd\systemd-bootx64.efi" > /boot/startup.nsh + fi } archbootloaderrefindmenu(){ - if [ "${1}" = "" ]; then - nextblitem="." - else - nextblitem=${1} - fi - options=() - options+=("${txtinstall//%1/refind}" "pacstrap refind-efi") - options+=("${txtedit//%1/refind_linux.conf}" "(${txtoptional})") - sel=$(whiptail --backtitle "${apptitle}" --title "${txtbootloaderrefindmenu}" --menu "" --cancel-button "${txtback}" --default-item "${nextblitem}" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - case ${sel} in - "${txtinstall//%1/refind}") - archrefindinstall - nextblitem="${txtedit//%1/refind_linux.conf}" - ;; - "${txtedit//%1/refind_linux.conf}") - ${EDITOR} /mnt/boot/refind_linux.conf - nextblitem="${txtedit//%1/refind_linux.conf}" - ;; - esac - archbootloaderrefindmenu "${nextblitem}" - fi + if [ "${1}" = "" ]; then + nextblitem="." + else + nextblitem=${1} + fi + options=() + options+=("${txtinstall//%1/refind}" "pacstrap refind-efi") + options+=("${txtedit//%1/refind_linux.conf}" "(${txtoptional})") + sel=$(whiptail --backtitle "${apptitle}" --title "${txtbootloaderrefindmenu}" --menu "" --cancel-button "${txtback}" --default-item "${nextblitem}" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + case ${sel} in + "${txtinstall//%1/refind}") + archrefindinstall + nextblitem="${txtedit//%1/refind_linux.conf}" + ;; + "${txtedit//%1/refind_linux.conf}") + ${EDITOR} /mnt/boot/refind_linux.conf + nextblitem="${txtedit//%1/refind_linux.conf}" + ;; + esac + archbootloaderrefindmenu "${nextblitem}" + fi } archrefindinstall(){ - clear + clear - echo "pacstrap /mnt refind-efi" - echo "archchroot refindbootloaderinstall ${realrootdev}" - echo "echo \"\\\"Arch Linux \\\" \\\"root=UUID=${rootuuid} rw add_efi_memmap\\\"\" > /mnt/boot/refind_linux.conf" - echo "echo \"\\\"Arch Linux Fallback\\\" \\\"root=UUID=${rootuuid} rw add_efi_memmap initrd=/initramfs-linux-fallback.img\\\"\" >> /mnt/boot/refind_linux.conf" - echo "echo \"\\\"Arch Linux Terminal\\\" \\\"root=UUID=${rootuuid} rw add_efi_memmap systemd.unit=multi-user.target\\\"\" >> /mnt/boot/refind_linux.conf" + echo "pacstrap /mnt refind-efi" + echo "archchroot refindbootloaderinstall ${realrootdev}" + echo "echo \"\\\"Arch Linux \\\" \\\"root=UUID=${rootuuid} rw add_efi_memmap\\\"\" > /mnt/boot/refind_linux.conf" + echo "echo \"\\\"Arch Linux Fallback\\\" \\\"root=UUID=${rootuuid} rw add_efi_memmap initrd=/initramfs-linux-fallback.img\\\"\" >> /mnt/boot/refind_linux.conf" + echo "echo \"\\\"Arch Linux Terminal\\\" \\\"root=UUID=${rootuuid} rw add_efi_memmap systemd.unit=multi-user.target\\\"\" >> /mnt/boot/refind_linux.conf" - pacstrap /mnt refind-efi - archchroot refindbootloaderinstall ${realrootdev} - rootuuid=$(blkid -s UUID -o value ${realrootdev}) - echo "\"Arch Linux \" \"root=UUID=${rootuuid} rw add_efi_memmap\"" > /mnt/boot/refind_linux.conf - echo "\"Arch Linux Fallback\" \"root=UUID=${rootuuid} rw add_efi_memmap initrd=/initramfs-linux-fallback.img\"" >> /mnt/boot/refind_linux.conf - echo "\"Arch Linux Terminal\" \"root=UUID=${rootuuid} rw add_efi_memmap systemd.unit=multi-user.target\"" >> /mnt/boot/refind_linux.conf - pressanykey + pacstrap /mnt refind-efi + archchroot refindbootloaderinstall ${realrootdev} + rootuuid=$(blkid -s UUID -o value ${realrootdev}) + echo "\"Arch Linux \" \"root=UUID=${rootuuid} rw add_efi_memmap\"" > /mnt/boot/refind_linux.conf + echo "\"Arch Linux Fallback\" \"root=UUID=${rootuuid} rw add_efi_memmap initrd=/initramfs-linux-fallback.img\"" >> /mnt/boot/refind_linux.conf + echo "\"Arch Linux Terminal\" \"root=UUID=${rootuuid} rw add_efi_memmap systemd.unit=multi-user.target\"" >> /mnt/boot/refind_linux.conf + pressanykey } archrefindinstallchroot(){ - #--usedefault /dev/sdXY --alldrivers - echo "refind-install" - refind-install - isvbox=$(lspci | grep "VirtualBox G") - if [ "${isvbox}" ]; then - echo "VirtualBox detected, creating startup.nsh..." - echo "\EFI\refind\refind_x64.efi" > /boot/startup.nsh - fi + #--usedefault /dev/sdXY --alldrivers + echo "refind-install" + refind-install + isvbox=$(lspci | grep "VirtualBox G") + if [ "${isvbox}" ]; then + echo "VirtualBox detected, creating startup.nsh..." + echo "\EFI\refind\refind_x64.efi" > /boot/startup.nsh + fi } archenabledhcpcd(){ - if (whiptail --backtitle "${apptitle}" --title "${txtenable//%1/dhcpcd}" --yesno "${txtenable//%1/dhcpcd} ?" 0 0) then - clear - - echo "pacstrap /mnt dhcpcd" - - pacstrap /mnt dhcpcd - archchroot enabledhcpcd - pressanykey - fi + if (whiptail --backtitle "${apptitle}" --title "${txtenable//%1/dhcpcd}" --yesno "${txtenable//%1/dhcpcd} ?" 0 0) then + clear + + echo "pacstrap /mnt dhcpcd" + + pacstrap /mnt dhcpcd + archchroot enabledhcpcd + pressanykey + fi } archenabledhcpcdchroot(){ - echo "systemctl enable dhcpcd" - systemctl enable dhcpcd - exit + echo "systemctl enable dhcpcd" + systemctl enable dhcpcd + exit } installarchdi(){ - txtinstallarchdi="Arch Linux Desktop Install (archdi) is a second script who can help you to install a full workstation.\n\nYou can just launch the script or install it. Choose in the next menu.\n\nArch Linux Desktop Install as two dependencies : wget and libnewt.\n\npacstrap wget libnewt ?" - if(whiptail --backtitle "${apptitle}" --title "archdi" --yesno "${txtinstallarchdi}" 0 0) then - clear - echo "pacstrap /mnt wget libnewt" - pacstrap /mnt wget libnewt - fi - if [ "$?" = "0" ]; then - options=() - options+=("${txtarchdiinstallandlaunch}" "") - options+=("${txtarchdilaunch}" "") - options+=("${txtarchdiinstall}" "") - sel=$(whiptail --backtitle "${apptitle}" --title "${txtarchdimenu}" --menu "" --cancel-button "${txtback}" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - case ${sel} in - "${txtarchdiinstallandlaunch}") archchroot archdiinstallandlaunch;; - "${txtarchdilaunch}") archchroot archdilaunch;; - "${txtarchdiinstall}") - clear - archchroot archdiinstall - pressanykey - ;; - esac - fi - fi + txtinstallarchdi="Arch Linux Desktop Install (archdi) is a second script who can help you to install a full workstation.\n\nYou can just launch the script or install it. Choose in the next menu.\n\nArch Linux Desktop Install as two dependencies : wget and libnewt.\n\npacstrap wget libnewt ?" + if(whiptail --backtitle "${apptitle}" --title "archdi" --yesno "${txtinstallarchdi}" 0 0) then + clear + echo "pacstrap /mnt wget libnewt" + pacstrap /mnt wget libnewt + fi + if [ "$?" = "0" ]; then + options=() + options+=("${txtarchdiinstallandlaunch}" "") + options+=("${txtarchdilaunch}" "") + options+=("${txtarchdiinstall}" "") + sel=$(whiptail --backtitle "${apptitle}" --title "${txtarchdimenu}" --menu "" --cancel-button "${txtback}" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + case ${sel} in + "${txtarchdiinstallandlaunch}") archchroot archdiinstallandlaunch;; + "${txtarchdilaunch}") archchroot archdilaunch;; + "${txtarchdiinstall}") + clear + archchroot archdiinstall + pressanykey + ;; + esac + fi + fi } archdidownload(){ - txtselectserver="Select source server :" - txtback="Back" - options=() - options+=("sourceforge.net" "recommended") - options+=("github.com" "") - sel=$(whiptail --backtitle "${apptitle}" --title "${txtselectserver}" --menu "" --cancel-button "${txtback}" 0 0 0 \ - "${options[@]}" \ - 3>&1 1>&2 2>&3) - if [ "$?" = "0" ]; then - case ${sel} in - "sourceforge.net") - archdiurl=archdi.sourceforge.net/archdi - ;; - "github.com") - archdiurl=matmoul.github.io/archdi >archdi - ;; - esac - fi - echo "curl -L ${archdiurl} >archdi" - curl -L ${archdiurl} >archdi + txtselectserver="Select source server :" + txtback="Back" + options=() + options+=("sourceforge.net" "recommended") + options+=("github.com" "") + sel=$(whiptail --backtitle "${apptitle}" --title "${txtselectserver}" --menu "" --cancel-button "${txtback}" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ "$?" = "0" ]; then + case ${sel} in + "sourceforge.net") + archdiurl=archdi.sourceforge.net/archdi + ;; + "github.com") + archdiurl=matmoul.github.io/archdi >archdi + ;; + esac + fi + echo "curl -L ${archdiurl} >archdi" + curl -L ${archdiurl} >archdi } archdiinstallandlaunchchroot(){ - cd - archdidownload - sh archdi -i - archdi --chroot - exit + cd + archdidownload + sh archdi -i + archdi --chroot + exit } archdilaunchchroot(){ - cd - archdidownload - sh archdi --chroot - rm archdi - exit + cd + archdidownload + sh archdi --chroot + rm archdi + exit } archdiinstallchroot(){ - cd - archdidownload - sh archdi -i - exit + cd + archdidownload + sh archdi -i + exit } # -------------------------------------------------------- @@ -1765,112 +1765,112 @@ archdiinstallchroot(){ # -------------------------------------------------------- pressanykey(){ - read -n1 -p "${txtpressanykey}" + read -n1 -p "${txtpressanykey}" } loadstrings(){ - locale=en_US.UTF-8 - #font= + locale=en_US.UTF-8 + #font= - txtexit="Exit" - txtback="Back" - txtignore="Ignore" + txtexit="Exit" + txtback="Back" + txtignore="Ignore" - txtselectserver="Select source server :" + txtselectserver="Select source server :" - txtmainmenu="Main Menu" - txtlanguage="Language" - txtsetkeymap="Set Keyboard Layout" - txteditor="Editor" - txtdiskpartmenu="Disk Partitions" - txtselectpartsmenu="Select Partitions and Install" - txthelp="Help" - txtchangelog="Changelog" - txtreboot="Reboot" + txtmainmenu="Main Menu" + txtlanguage="Language" + txtsetkeymap="Set Keyboard Layout" + txteditor="Editor" + txtdiskpartmenu="Disk Partitions" + txtselectpartsmenu="Select Partitions and Install" + txthelp="Help" + txtchangelog="Changelog" + txtreboot="Reboot" - txtautoparts="Auto Partitions" - txteditparts="Edit Partitions" + txtautoparts="Auto Partitions" + txteditparts="Edit Partitions" - txtautopartsconfirm="Selected device : %1\n\nAll data will be erased ! \n\nContinue ?" + txtautopartsconfirm="Selected device : %1\n\nAll data will be erased ! \n\nContinue ?" - txtautopartclear="Clear all partition data" - txtautopartcreate="Create %1 partition" - txthybridpartcreate="Set hybrid MBR" - txtautopartsettype="Set %1 partition type" + txtautopartclear="Clear all partition data" + txtautopartcreate="Create %1 partition" + txthybridpartcreate="Set hybrid MBR" + txtautopartsettype="Set %1 partition type" - txtselectdevice="Select %1 device :" - txtselecteddevices="Selected devices :" + txtselectdevice="Select %1 device :" + txtselecteddevices="Selected devices :" - txtformatmountmenu="Format and Mount" - txtformatdevices="Format Devices" - txtformatdevice="Format Device" - txtmount="Mount" - txtunmount="Unmount" - txtmountdesc="Install or Config" + txtformatmountmenu="Format and Mount" + txtformatdevices="Format Devices" + txtformatdevice="Format Device" + txtmount="Mount" + txtunmount="Unmount" + txtmountdesc="Install or Config" - txtformatdeviceconfirm="Warning, all data on selected devices will be erased ! \nFormat devices ?" + txtformatdeviceconfirm="Warning, all data on selected devices will be erased ! \nFormat devices ?" - txtselectpartformat="Select partition format for %1 :" - txtformatingpart="Formatting partition %1 as" - txtcreateluksdevice="Create luks device :" - txtopenluksdevice="Open luks device :" - txtluksdevicecreated="luks device created !" + txtselectpartformat="Select partition format for %1 :" + txtformatingpart="Formatting partition %1 as" + txtcreateluksdevice="Create luks device :" + txtopenluksdevice="Open luks device :" + txtluksdevicecreated="luks device created !" - txtinstallmenu="Install Menu" + txtinstallmenu="Install Menu" - txtarchinstallmenu="Arch Install Menu" + txtarchinstallmenu="Arch Install Menu" - txtselectmirrorsbycountry="Select mirrors by country" - txtselectcountry="Select country" - txteditmirrorlist="Edit mirrorlist" - txtinstallarchlinux="Install Arch Linux" - txtinstallarchlinuxkernel="Kernel" - txtinstallarchlinuxfirmwares="Firmwares" - txtinstallarchlinuxfilesystems="File Systems" - txtconfigarchlinux="Config Arch Linux" + txtselectmirrorsbycountry="Select mirrors by country" + txtselectcountry="Select country" + txteditmirrorlist="Edit mirrorlist" + txtinstallarchlinux="Install Arch Linux" + txtinstallarchlinuxkernel="Kernel" + txtinstallarchlinuxfirmwares="Firmwares" + txtinstallarchlinuxfilesystems="File Systems" + txtconfigarchlinux="Config Arch Linux" - txtsethostname="Set Computer Name" - txtsetfont="Set Font" - txtsetlocale="Set Locale" - txtsettime="Set Time" - txtsetrootpassword="Set root password" + txtsethostname="Set Computer Name" + txtsetfont="Set Font" + txtsetlocale="Set Locale" + txtsettime="Set Time" + txtsetrootpassword="Set root password" - txtuseutcclock="Use UTC hardware clock ?" + txtuseutcclock="Use UTC hardware clock ?" - txtbootloader="Bootloader" - txtbootloadermenu="Choose your bootloader" + txtbootloader="Bootloader" + txtbootloadermenu="Choose your bootloader" - txtefibootmgr="efibootmgr is required for EFI computers." + txtefibootmgr="efibootmgr is required for EFI computers." - txtbootloadergrubmenu="Grub Install Menu" - txtrungrubmakeconfig="Run grub-mkconfig ?" - txtgrubluksdetected="Encrypted root partion !\n\nAdd cryptdevice= to GRUB_CMDLINE_LINUX in /etc/default/grub ?" + txtbootloadergrubmenu="Grub Install Menu" + txtrungrubmakeconfig="Run grub-mkconfig ?" + txtgrubluksdetected="Encrypted root partion !\n\nAdd cryptdevice= to GRUB_CMDLINE_LINUX in /etc/default/grub ?" - txtbootloadersyslinuxmenu="Syslinux Install Menu" - txtsyslinuxaddefibootmgr="EFI install require efibootmgr" - txtsyslinuxaddgptfdisk="GPT disk require gptfdisk" - txtsyslinuxaddmtools="FAT boot part require mtools" + txtbootloadersyslinuxmenu="Syslinux Install Menu" + txtsyslinuxaddefibootmgr="EFI install require efibootmgr" + txtsyslinuxaddgptfdisk="GPT disk require gptfdisk" + txtsyslinuxaddmtools="FAT boot part require mtools" - txtbootloadersystemdmenu="Systemd-boot Install Menu" + txtbootloadersystemdmenu="Systemd-boot Install Menu" - txtbootloaderrefindmenu="rEFInd Install Menu" + txtbootloaderrefindmenu="rEFInd Install Menu" - txtoptional="Optional" - txtrecommandeasyinst="Recommanded for easy install" - txtset="Set %1" - txtgenerate="Generate %1" - txtedit="Edit %1" - txtinstall="Install %1" - txtenable="Enable %1" + txtoptional="Optional" + txtrecommandeasyinst="Recommanded for easy install" + txtset="Set %1" + txtgenerate="Generate %1" + txtedit="Edit %1" + txtinstall="Install %1" + txtenable="Enable %1" - txtpressanykey="Press any key to continue." + txtpressanykey="Press any key to continue." - txtarchdidesc="Full desktop install script" - txtinstallarchdi="Arch Linux Desktop Install (archdi) is a second script who can help you to install a full workstation.\n\nYou can just launch the script or install it. Choose in the next menu.\n\nArch Linux Desktop Install as two dependencies : wget and libnewt.\n\npacstrap wget libnewt ?" - txtarchdiinstallandlaunch="Install and run archdi" - txtarchdiinstall="Install archdi" - txtarchdilaunch="Launch archdi" + txtarchdidesc="Full desktop install script" + txtinstallarchdi="Arch Linux Desktop Install (archdi) is a second script who can help you to install a full workstation.\n\nYou can just launch the script or install it. Choose in the next menu.\n\nArch Linux Desktop Install as two dependencies : wget and libnewt.\n\npacstrap wget libnewt ?" + txtarchdiinstallandlaunch="Install and run archdi" + txtarchdiinstall="Install archdi" + txtarchdilaunch="Launch archdi" } # -------------------------------------------------------- @@ -1879,74 +1879,74 @@ loadstrings(){ # -------------------------------------------------------- while (( "$#" )); do - case ${1} in - --help) - echo "archfi" - echo "------" - echo "-sf | --skip-font Skip setfont from language files" - echo "-efiX -efi0 : disable EFI, -efi1 efi inst, -efi2 efi hybrid inst" - echo "-t | --test ghusername ghbranch Test archfi script and language" - exit 0 - ;; - -sf | --skip-font) skipfont=1;; - -t | --test) - wget -O archfi https://raw.githubusercontent.com/${2}/archfi/${3}/archfi - sh archfi -tt ${2} ${3} - exit 0 - ;; - -tt) baseurl="https://raw.githubusercontent.com/${2}/archfi/${3}";; - -efi0) efimode=0;; - -efi1) - eficomputer=1 - efimode=1 - ;; - -efi2) - eficomputer=1 - efimode=2 - ;; - --chroot) chroot=1 - command=${2} - args=${3};; - esac - shift + case ${1} in + --help) + echo "archfi" + echo "------" + echo "-sf | --skip-font Skip setfont from language files" + echo "-efiX -efi0 : disable EFI, -efi1 efi inst, -efi2 efi hybrid inst" + echo "-t | --test ghusername ghbranch Test archfi script and language" + exit 0 + ;; + -sf | --skip-font) skipfont=1;; + -t | --test) + wget -O archfi https://raw.githubusercontent.com/${2}/archfi/${3}/archfi + sh archfi -tt ${2} ${3} + exit 0 + ;; + -tt) baseurl="https://raw.githubusercontent.com/${2}/archfi/${3}";; + -efi0) efimode=0;; + -efi1) + eficomputer=1 + efimode=1 + ;; + -efi2) + eficomputer=1 + efimode=2 + ;; + --chroot) chroot=1 + command=${2} + args=${3};; + esac + shift done if [ "${chroot}" = "1" ]; then - case ${command} in - 'setrootpassword') archsetrootpasswordchroot;; - 'setlocale') archsetlocalechroot;; - 'settimeutc') archsettimeutcchroot;; - 'settimelocal') archsettimelocalchroot;; - 'genmkinitcpio') archgenmkinitcpiochroot;; - 'enabledhcpcd') archenabledhcpcdchroot;; - 'grubinstall') archgrubinstallchroot;; - 'grubbootloaderinstall') archgrubinstallbootloaderchroot ${args};; - 'grubbootloaderefiinstall') archgrubinstallbootloaderefichroot ${args};; - 'grubbootloaderefiusbinstall') archgrubinstallbootloaderefiusbchroot ${args};; - 'syslinuxbootloaderinstall') archsyslinuxinstallbootloaderchroot ${args};; - 'syslinuxbootloaderefiinstall') archsyslinuxinstallbootloaderefichroot ${args};; - 'systemdbootloaderinstall') archsystemdinstallchroot ${args};; - 'refindbootloaderinstall') archrefindinstallchroot ${args};; - 'archdiinstallandlaunch') archdiinstallandlaunchchroot;; - 'archdiinstall') archdiinstallchroot;; - 'archdilaunch') archdilaunchchroot;; - esac + case ${command} in + 'setrootpassword') archsetrootpasswordchroot;; + 'setlocale') archsetlocalechroot;; + 'settimeutc') archsettimeutcchroot;; + 'settimelocal') archsettimelocalchroot;; + 'genmkinitcpio') archgenmkinitcpiochroot;; + 'enabledhcpcd') archenabledhcpcdchroot;; + 'grubinstall') archgrubinstallchroot;; + 'grubbootloaderinstall') archgrubinstallbootloaderchroot ${args};; + 'grubbootloaderefiinstall') archgrubinstallbootloaderefichroot ${args};; + 'grubbootloaderefiusbinstall') archgrubinstallbootloaderefiusbchroot ${args};; + 'syslinuxbootloaderinstall') archsyslinuxinstallbootloaderchroot ${args};; + 'syslinuxbootloaderefiinstall') archsyslinuxinstallbootloaderefichroot ${args};; + 'systemdbootloaderinstall') archsystemdinstallchroot ${args};; + 'refindbootloaderinstall') archrefindinstallchroot ${args};; + 'archdiinstallandlaunch') archdiinstallandlaunchchroot;; + 'archdiinstall') archdiinstallchroot;; + 'archdilaunch') archdilaunchchroot;; + esac else - pacman -S --needed arch-install-scripts wget libnewt - dmesg |grep efi: > /dev/null - if [ "$?" == "1" ]; then - if [ "${eficomputer}" != "1" ]; then - eficomputer=0 - fi - else - eficomputer=1 - if [ "${efimode}" == "" ]; then - efimode=1 - fi - fi - loadstrings - EDITOR=nano - mainmenu + pacman -S --needed arch-install-scripts wget libnewt + dmesg |grep efi: > /dev/null + if [ "$?" == "1" ]; then + if [ "${eficomputer}" != "1" ]; then + eficomputer=0 + fi + else + eficomputer=1 + if [ "${efimode}" == "" ]; then + efimode=1 + fi + fi + loadstrings + EDITOR=nano + mainmenu fi exit 0 From 1c9095692b78b72990d399c5639d9400a42dcca3 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Fri, 3 Apr 2020 21:03:03 +0200 Subject: [PATCH 08/23] Loop root password if error --- archfi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/archfi b/archfi index c895ffa..ba736d0 100644 --- a/archfi +++ b/archfi @@ -1165,7 +1165,11 @@ archsetrootpassword(){ } archsetrootpasswordchroot(){ echo "passwd root" - passwd root + passed=1 + while [[ ${passed} != 0 ]]; do + passwd root + passed=$? + done exit } From 946812b3f8abbde6d756a493c063fb29a2f0e755 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Fri, 3 Apr 2020 22:37:19 +0200 Subject: [PATCH 09/23] Add extra menu --- archfi | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/archfi b/archfi index ba736d0..a2f7ab3 100644 --- a/archfi +++ b/archfi @@ -904,7 +904,7 @@ archmenu(){ options+=("${txtedit//%1/mkinitcpio.conf}" "(${txtoptional})") options+=("${txtedit//%1/mirrorlist}" "(${txtoptional})") options+=("${txtbootloader}" "") - options+=("${txtenable//%1/dhcpcd}" "systemctl enable dhcpcd") + options+=("${txtextrasmenu}" "") options+=("archdi" "${txtarchdidesc}") sel=$(whiptail --backtitle "${apptitle}" --title "${txtarchinstallmenu}" --menu "" --cancel-button "${txtback}" --default-item "${nextitem}" 0 0 0 \ "${options[@]}" \ @@ -993,10 +993,10 @@ archmenu(){ ;; "${txtbootloader}") archbootloadermenu - nextitem="${txtenable//%1/dhcpcd}" + nextitem="${txtextrasmenu}" ;; - "${txtenable//%1/dhcpcd}") - archenabledhcpcd + "${txtextrasmenu}") + archextrasmenu nextitem="archdi" ;; "archdi") @@ -1676,16 +1676,29 @@ archrefindinstallchroot(){ } -archenabledhcpcd(){ - if (whiptail --backtitle "${apptitle}" --title "${txtenable//%1/dhcpcd}" --yesno "${txtenable//%1/dhcpcd} ?" 0 0) then - clear - - echo "pacstrap /mnt dhcpcd" - - pacstrap /mnt dhcpcd - archchroot enabledhcpcd - pressanykey +archextrasmenu(){ + pkgs="" + options=() + options+=("nano" "" on) + options+=("vim" "" on) + options+=("dhcpcd" "" on) + options+=("dialog" "" on) + sel=$(whiptail --backtitle "${apptitle}" --title "${txtextrasmenu}" --checklist "" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ ! "$?" = "0" ]; then + return 1 fi + for itm in $sel; do + pkgs="$pkgs $(echo $itm | sed 's/"//g')" + done + clear + echo "pacstrap /mnt ${pkgs}" + pacstrap /mnt ${pkgs} + if [[ "${pkgs}" == *"dhcpcd"* ]]; then + archchroot enabledhcpcd + fi + pressanykey } archenabledhcpcdchroot(){ echo "systemctl enable dhcpcd" @@ -1859,6 +1872,8 @@ loadstrings(){ txtbootloadersystemdmenu="Systemd-boot Install Menu" txtbootloaderrefindmenu="rEFInd Install Menu" + + txtextrasmenu="Extras" txtoptional="Optional" txtrecommandeasyinst="Recommanded for easy install" From cc281cf08ff8ebf73ad07890101f8f06848dcf1f Mon Sep 17 00:00:00 2001 From: MatMoul Date: Fri, 3 Apr 2020 22:46:56 +0200 Subject: [PATCH 10/23] Update Visual Set Time --- archfi | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/archfi b/archfi index a2f7ab3..837162c 100644 --- a/archfi +++ b/archfi @@ -1136,13 +1136,33 @@ archsettime(){ ln -sf /usr/share/zoneinfo/${timezone} /mnt/etc/localtime pressanykey - if (whiptail --backtitle "${apptitle}" --title "${txtsettime}" --yesno "${txtuseutcclock}" 0 0) then - clear - archchroot settimeutc - else - clear - archchroot settimelocal + options=() + options+=("UTC" "") + options+=("Local" "") + sel=$(whiptail --backtitle "${apptitle}" --title "${txtsettime}" --menu "${txthwclock}" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ ! "$?" = "0" ]; then + return 1 fi + + clear + case ${sel} in + "${txthwclockutc}") + archchroot settimeutc + ;; + "${txthwclocklocal}") + archchroot settimelocal + ;; + esac + +# if (whiptail --backtitle "${apptitle}" --title "${txtsettime}" --yesno "${txtuseutcclock}" 0 0) then +# clear +# archchroot settimeutc +# else +# clear +# archchroot settimelocal +# fi pressanykey @@ -1853,7 +1873,9 @@ loadstrings(){ txtsettime="Set Time" txtsetrootpassword="Set root password" - txtuseutcclock="Use UTC hardware clock ?" + txthwclock="Hardware clock :" + txthwclockutc="UTC" + txthwclocklocal="Local" txtbootloader="Bootloader" txtbootloadermenu="Choose your bootloader" From 82fb13da8b9d6aab479e3ba65af60479de9f70a9 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Fri, 3 Apr 2020 23:01:10 +0200 Subject: [PATCH 11/23] Update lng files en and fr --- lng/English | 14 ++++++++++++-- lng/French | 14 ++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/lng/English b/lng/English index 8262d77..e5f66ec 100644 --- a/lng/English +++ b/lng/English @@ -58,9 +58,13 @@ txtinstallmenu="Install Menu" txtarchinstallmenu="Arch Install Menu" +txtselectmirrorsbycountry="Select mirrors by country" +txtselectcountry="Select country" txteditmirrorlist="Edit mirrorlist" txtinstallarchlinux="Install Arch Linux" -txtinstallfirmware="Install Firmware" +txtinstallarchlinuxkernel="Kernel" +txtinstallarchlinuxfirmwares="Firmwares" +txtinstallarchlinuxfilesystems="File Systems" txtconfigarchlinux="Config Arch Linux" txtsethostname="Set Computer Name" @@ -69,7 +73,9 @@ txtsetlocale="Set Locale" txtsettime="Set Time" txtsetrootpassword="Set root password" -txtuseutcclock="Use UTC hardware clock ?" +txthwclock="Hardware clock :" +txthwclockutc="UTC" +txthwclocklocal="Local" txtbootloader="Bootloader" txtbootloadermenu="Choose your bootloader" @@ -85,8 +91,12 @@ txtsyslinuxaddefibootmgr="EFI install require efibootmgr" txtsyslinuxaddgptfdisk="GPT disk require gptfdisk" txtsyslinuxaddmtools="FAT boot part require mtools" +txtbootloadersystemdmenu="Systemd-boot Install Menu" + txtbootloaderrefindmenu="rEFInd Install Menu" +txtextrasmenu="Extras" + txtoptional="Optional" txtrecommandeasyinst="Recommanded for easy install" txtset="Set %1" diff --git a/lng/French b/lng/French index 6b914d7..170770f 100644 --- a/lng/French +++ b/lng/French @@ -58,9 +58,13 @@ txtinstallmenu="Menu Installation" txtarchinstallmenu="Menu Installation Arch Linux" +txtselectmirrorsbycountry="Mirroir par pays" +txtselectcountry="Sélectionner pays" txteditmirrorlist="Éditer mirrorlist" txtinstallarchlinux="Installer Arch Linux" -txtinstallfirmware="Installer les firmwares" +txtinstallarchlinuxkernel="Noyau" +txtinstallarchlinuxfirmwares="Firmwares" +txtinstallarchlinuxfilesystems="Systèmes de fichier" txtconfigarchlinux="Configurer Arch Linux" txtsethostname="Définir le nom de l'ordinateur" @@ -69,7 +73,9 @@ txtsetlocale="Définir Locale" txtsettime="Définir l'horloge" txtsetrootpassword="Définir le mot de passe root" -txtuseutcclock="Utiliser une horloge matérielle UTC ?" +txthwclock="Horloge matériel :" +txthwclockutc="UTC" +txthwclocklocal="Local" txtbootloader="Bootloader" txtbootloadermenu="Choisissez votre bootloader" @@ -85,8 +91,12 @@ txtsyslinuxaddefibootmgr="Une installation EFI nécessite efibootmgr" txtsyslinuxaddgptfdisk="Un disque GPT nécessite gptfdisk" txtsyslinuxaddmtools="Un partition de boot FAT nécessite mtools" +txtbootloadersystemdmenu="Menu Installation Systemd-boot" + txtbootloaderrefindmenu="Menu Installation rEFInd" +txtextrasmenu="Extras" + txtoptional="Optionnel" txtrecommandeasyinst="Recommandé pour installation rapide" txtset="Définir %1" From 04ad84f3fc57b4255e0bd6ead6f66da2115e4527 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Fri, 3 Apr 2020 23:06:18 +0200 Subject: [PATCH 12/23] Finalize arabic --- archfi | 1 + lng/Arabic | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/archfi b/archfi index 837162c..e2765ee 100644 --- a/archfi +++ b/archfi @@ -79,6 +79,7 @@ mainmenu(){ chooselanguage(){ options=() + options+=("Arabic" "(By Mohammad Alawadi)") options+=("Brazilian" "(By MaxWilliamJF)") options+=("Dutch" "(By bowero)") options+=("English" "(By MatMoul)") diff --git a/lng/Arabic b/lng/Arabic index 57915c8..b8fc149 100644 --- a/lng/Arabic +++ b/lng/Arabic @@ -9,8 +9,8 @@ # root@mohdalawadi.com -locale=en_US.UTF-8 -#font= +locale=ar_SA.UTF-8 +font=LatArCyrHeb-14 txtexit="خروج" txtback="رجوع" From c81d814bf39ed8cbfbc5f79988d5e478621d3136 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Fri, 3 Apr 2020 23:19:48 +0200 Subject: [PATCH 13/23] Remove dialog from extras --- archfi | 1 - 1 file changed, 1 deletion(-) diff --git a/archfi b/archfi index e2765ee..262d6fe 100644 --- a/archfi +++ b/archfi @@ -1703,7 +1703,6 @@ archextrasmenu(){ options+=("nano" "" on) options+=("vim" "" on) options+=("dhcpcd" "" on) - options+=("dialog" "" on) sel=$(whiptail --backtitle "${apptitle}" --title "${txtextrasmenu}" --checklist "" 0 0 0 \ "${options[@]}" \ 3>&1 1>&2 2>&3) From 776a6afb4bc94f1a73d47794a992a73ba60faf48 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Fri, 3 Apr 2020 23:27:34 +0200 Subject: [PATCH 14/23] New Release : 2020.04.03.23.27.26 --- archfi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archfi b/archfi index 262d6fe..3a30593 100644 --- a/archfi +++ b/archfi @@ -12,7 +12,7 @@ # referance : https://wiki.archlinux.org/index.php/Installation_guide -apptitle="Arch Linux Fast Install (archfi) - Version: 2020.03.09.20.29.12 (GPLv3)" +apptitle="Arch Linux Fast Install (archfi) - Version: 2020.04.03.23.27.26 (GPLv3)" baseurl=https://raw.githubusercontent.com/MatMoul/archfi/master skipfont="0" fspkgs="" From 0d1c378e0cce2605e986847a26cae72a4c51053a Mon Sep 17 00:00:00 2001 From: MatMoul Date: Sun, 5 Apr 2020 05:24:23 +0200 Subject: [PATCH 15/23] Finalize Norwegian --- CONTRIBUTING.md | 2 +- archfi | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index edfa200..a3b9d57 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,4 +7,4 @@ * **Preserve identation on empty line** * **Test your changes** -- [X] I've read these rules before submitting my PR. +- [ ] I've read these rules before submitting my PR. diff --git a/archfi b/archfi index 3a30593..ba5510a 100644 --- a/archfi +++ b/archfi @@ -88,6 +88,7 @@ chooselanguage(){ options+=("Greek" "(By quelotic)") options+=("Italian" "(By thegoldgoat)") options+=("Hungarian" "(By KardiWeb)") + options+=("Norwegian" "(By mrboen94)") options+=("Polish" "(By dawidd6)") options+=("Portuguese" "(By hugok)") options+=("Russian" "(By Anonymous_Prodject)") From caf7a51906283e62d294dcf26ffeea043b202f4c Mon Sep 17 00:00:00 2001 From: MatMoul Date: Sun, 5 Apr 2020 05:40:16 +0200 Subject: [PATCH 16/23] New Release : 2020.04.05.05.40.08 --- archfi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archfi b/archfi index ba5510a..d96988e 100644 --- a/archfi +++ b/archfi @@ -12,7 +12,7 @@ # referance : https://wiki.archlinux.org/index.php/Installation_guide -apptitle="Arch Linux Fast Install (archfi) - Version: 2020.04.03.23.27.26 (GPLv3)" +apptitle="Arch Linux Fast Install (archfi) - Version: 2020.04.05.05.40.08 (GPLv3)" baseurl=https://raw.githubusercontent.com/MatMoul/archfi/master skipfont="0" fspkgs="" From 6f13531f46d62411cae96e5a1d476c957816c85e Mon Sep 17 00:00:00 2001 From: MatMoul Date: Sun, 5 Apr 2020 22:52:35 +0200 Subject: [PATCH 17/23] Add lvm2 and dmraid in filesystem selection --- archfi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/archfi b/archfi index d96988e..4cbf081 100644 --- a/archfi +++ b/archfi @@ -847,6 +847,8 @@ installbase(){ else options+=("reiserfsprogs" "" off) fi + options+=("lvm2" "" off) + options+=("dmraid" "" off) sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallarchlinuxfilesystems}" --checklist "" 0 0 0 \ "${options[@]}" \ 3>&1 1>&2 2>&3) From a17a636e1cbb21d72447034295413c418d93ea24 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Sun, 5 Apr 2020 23:08:18 +0200 Subject: [PATCH 18/23] New Release : 2020.04.05.23.08.12 --- archfi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archfi b/archfi index 4cbf081..e6c0df0 100644 --- a/archfi +++ b/archfi @@ -12,7 +12,7 @@ # referance : https://wiki.archlinux.org/index.php/Installation_guide -apptitle="Arch Linux Fast Install (archfi) - Version: 2020.04.05.05.40.08 (GPLv3)" +apptitle="Arch Linux Fast Install (archfi) - Version: 2020.04.05.23.08.12 (GPLv3)" baseurl=https://raw.githubusercontent.com/MatMoul/archfi/master skipfont="0" fspkgs="" From df6c2bde7c8bb7dd5406aaa3a5b99022a3b57b01 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Wed, 8 Apr 2020 04:17:25 +0200 Subject: [PATCH 19/23] Add custom package list support --- archfi | 28 ++++++++++++++++++++++++++++ samples/custompackagelist | 13 +++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 samples/custompackagelist diff --git a/archfi b/archfi index e6c0df0..410b8f5 100644 --- a/archfi +++ b/archfi @@ -14,6 +14,7 @@ apptitle="Arch Linux Fast Install (archfi) - Version: 2020.04.05.23.08.12 (GPLv3)" baseurl=https://raw.githubusercontent.com/MatMoul/archfi/master +cpl=0 skipfont="0" fspkgs="" @@ -859,6 +860,24 @@ installbase(){ pkgs="$pkgs $(echo $itm | sed 's/"//g')" done + if [[ ${cpl} == 1 ]]; then + sed -i '/^\s*$/d' /tmp/archfi-custom-package-list + sed -i '/^#/ d' /tmp/archfi-custom-package-list + options=() + while read pkg; do + options+=("${pkg}" "" on) + done < /tmp/archfi-custom-package-list + sel=$(whiptail --backtitle "${apptitle}" --title "Custom Package List" --checklist "" 0 0 0 \ + "${options[@]}" \ + 3>&1 1>&2 2>&3) + if [ ! "$?" = "0" ]; then + return 1 + fi + for itm in $sel; do + pkgs="$pkgs $(echo $itm | sed 's/"//g')" + done + fi + clear echo "pacstrap /mnt ${pkgs}" pacstrap /mnt ${pkgs} @@ -1927,11 +1946,20 @@ while (( "$#" )); do --help) echo "archfi" echo "------" + echo "-cpl | --custom-package-list url Set custom package list url" echo "-sf | --skip-font Skip setfont from language files" echo "-efiX -efi0 : disable EFI, -efi1 efi inst, -efi2 efi hybrid inst" echo "-t | --test ghusername ghbranch Test archfi script and language" exit 0 ;; + -cpl | --custom-package-list) + curl -L ${2} > /tmp/archfi-custom-package-list + if [[ "$?" != "0" ]]; then + echo "Error downloading custom package list" + exit 0 + fi + cpl=1 + ;; -sf | --skip-font) skipfont=1;; -t | --test) wget -O archfi https://raw.githubusercontent.com/${2}/archfi/${3}/archfi diff --git a/samples/custompackagelist b/samples/custompackagelist new file mode 100644 index 0000000..0dd466c --- /dev/null +++ b/samples/custompackagelist @@ -0,0 +1,13 @@ +# This file is a sample of a custom package list that is available at the pacstrap step. +# Each line is a package but empty line and commented line is supported. + +# How to use : +# Store your own file on a web server +# Launch archfi with : +# archfi -cpl url_of_the_file + +# Some packages : +neofetch +nmon +lsusb +# base-devel From 9f0465c6c7139d8addabc2331d41f46b2569c9b4 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Wed, 8 Apr 2020 04:31:15 +0200 Subject: [PATCH 20/23] Finalize custom package list support --- README.md | 5 +++++ archfi | 3 ++- lng/English | 1 + lng/French | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 42598ce..67ec1cd 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,11 @@ Then follow the on-screen instructions to completion. If you require extra help, visit the provided video playlist and follow my example. +## More custom install + + sh archfi -cpl {URL of your custom package list} + +You can find a sample custom package list file in the samples folder. ## For developers diff --git a/archfi b/archfi index 410b8f5..7b1d33c 100644 --- a/archfi +++ b/archfi @@ -867,7 +867,7 @@ installbase(){ while read pkg; do options+=("${pkg}" "" on) done < /tmp/archfi-custom-package-list - sel=$(whiptail --backtitle "${apptitle}" --title "Custom Package List" --checklist "" 0 0 0 \ + sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallarchlinuxcustompackagelist}" --checklist "" 0 0 0 \ "${options[@]}" \ 3>&1 1>&2 2>&3) if [ ! "$?" = "0" ]; then @@ -1887,6 +1887,7 @@ loadstrings(){ txtinstallarchlinuxkernel="Kernel" txtinstallarchlinuxfirmwares="Firmwares" txtinstallarchlinuxfilesystems="File Systems" + txtinstallarchlinuxcustompackagelist="Custom Package List" txtconfigarchlinux="Config Arch Linux" txtsethostname="Set Computer Name" diff --git a/lng/English b/lng/English index e5f66ec..90e6d9b 100644 --- a/lng/English +++ b/lng/English @@ -65,6 +65,7 @@ txtinstallarchlinux="Install Arch Linux" txtinstallarchlinuxkernel="Kernel" txtinstallarchlinuxfirmwares="Firmwares" txtinstallarchlinuxfilesystems="File Systems" +txtinstallarchlinuxcustompackagelist="Custom Package List" txtconfigarchlinux="Config Arch Linux" txtsethostname="Set Computer Name" diff --git a/lng/French b/lng/French index 170770f..3c5f099 100644 --- a/lng/French +++ b/lng/French @@ -65,6 +65,7 @@ txtinstallarchlinux="Installer Arch Linux" txtinstallarchlinuxkernel="Noyau" txtinstallarchlinuxfirmwares="Firmwares" txtinstallarchlinuxfilesystems="Systèmes de fichier" +txtinstallarchlinuxcustompackagelist="Liste de paquet personnel" txtconfigarchlinux="Configurer Arch Linux" txtsethostname="Définir le nom de l'ordinateur" From f5989078dfb15582d8ca41b6da522c490adbb2c5 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Wed, 8 Apr 2020 04:32:30 +0200 Subject: [PATCH 21/23] New Release : 2020.04.08.04.32.18 --- archfi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archfi b/archfi index 7b1d33c..2b53a67 100644 --- a/archfi +++ b/archfi @@ -12,7 +12,7 @@ # referance : https://wiki.archlinux.org/index.php/Installation_guide -apptitle="Arch Linux Fast Install (archfi) - Version: 2020.04.05.23.08.12 (GPLv3)" +apptitle="Arch Linux Fast Install (archfi) - Version: 2020.04.08.04.32.18 (GPLv3)" baseurl=https://raw.githubusercontent.com/MatMoul/archfi/master cpl=0 skipfont="0" From 959cee7823f3dd681677554a6efb622a917ce4b5 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Wed, 8 Apr 2020 04:48:14 +0200 Subject: [PATCH 22/23] Finalize custom package list support --- samples/custompackagelist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/custompackagelist b/samples/custompackagelist index 0dd466c..01c7e3f 100644 --- a/samples/custompackagelist +++ b/samples/custompackagelist @@ -9,5 +9,5 @@ # Some packages : neofetch nmon -lsusb +lshw # base-devel From 33b1e5289ade4874693aa5a58f2c8f22ebfffd96 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Wed, 8 Apr 2020 04:48:34 +0200 Subject: [PATCH 23/23] New Release : 2020.04.08.04.48.28 --- archfi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archfi b/archfi index 2b53a67..c0b628b 100644 --- a/archfi +++ b/archfi @@ -12,7 +12,7 @@ # referance : https://wiki.archlinux.org/index.php/Installation_guide -apptitle="Arch Linux Fast Install (archfi) - Version: 2020.04.08.04.32.18 (GPLv3)" +apptitle="Arch Linux Fast Install (archfi) - Version: 2020.04.08.04.48.28 (GPLv3)" baseurl=https://raw.githubusercontent.com/MatMoul/archfi/master cpl=0 skipfont="0"