aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Carvalho <hugokarvalho@hotmail.com>2019-12-02 17:55:40 +0000
committerGitHub <noreply@github.com>2019-12-02 17:55:40 +0000
commit0b786c8c088df129709d354b451e4eed948d58c6 (patch)
treed7bc4ea85745ad63c53c20061250df1179132abe
parentdb7c72e6aa67106b094a862791b6a073784a2806 (diff)
parentbb41e897dca76e4d210382158b4006ca3d0857e7 (diff)
downloadhyperfi-0b786c8c088df129709d354b451e4eed948d58c6.tar.lz
hyperfi-0b786c8c088df129709d354b451e4eed948d58c6.tar.xz
hyperfi-0b786c8c088df129709d354b451e4eed948d58c6.zip
Merge pull request #2 from MatMoul/master
update
-rw-r--r--archfi120
-rw-r--r--lng/English1
-rw-r--r--lng/French1
3 files changed, 61 insertions, 61 deletions
diff --git a/archfi b/archfi
index fc91e5c..7bf0b84 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: 2019.10.06.21.58.07 (GPLv3)"
+apptitle="Arch Linux Fast Install (archfi) - Version: 2019.11.02.00.13.01 (GPLv3)"
baseurl=https://raw.githubusercontent.com/MatMoul/archfi/master
skipfont="0"
@@ -163,6 +163,25 @@ 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
+}
+
diskpartmenu(){
if [ "${1}" = "" ]; then
nextitem="."
@@ -217,14 +236,7 @@ diskpartmenu(){
diskpartautodos(){
- items=$(lsblk -d -p -n -l -o NAME -e 7,11)
- options=()
- for item in ${items}; do
- options+=("${item}" "")
- done
- device=$(whiptail --backtitle "${apptitle}" --title "${txtautoparts} (dos)" --menu "" 0 0 0 \
- "${options[@]}" \
- 3>&1 1>&2 2>&3)
+ device=$(selectdisk "${txtautoparts} (dos)")
if [ "$?" = "0" ]; then
if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (dos)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0) then
clear
@@ -259,14 +271,7 @@ diskpartautodos(){
}
diskpartautogpt(){
- items=$(lsblk -d -p -n -l -o NAME -e 7,11)
- options=()
- for item in ${items}; do
- options+=("${item}" "")
- done
- device=$(whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt)" --menu "" 0 0 0 \
- "${options[@]}" \
- 3>&1 1>&2 2>&3)
+ device=$(selectdisk "${txtautoparts} (gpt)")
if [ "$?" = "0" ]; then
if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0) then
clear
@@ -299,14 +304,7 @@ diskpartautogpt(){
}
diskpartautoefi(){
- items=$(lsblk -d -p -n -l -o NAME -e 7,11)
- options=()
- for item in ${items}; do
- options+=("${item}" "")
- done
- device=$(whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt,efi)" --menu "" 0 0 0 \
- "${options[@]}" \
- 3>&1 1>&2 2>&3)
+ 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
@@ -337,14 +335,7 @@ diskpartautoefi(){
}
diskpartautoefiusb(){
- items=$(lsblk -d -p -n -l -o NAME -e 7,11)
- options=()
- for item in ${items}; do
- options+=("${item}" "")
- done
- device=$(whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt,efi)" --menu "" 0 0 0 \
- "${options[@]}" \
- 3>&1 1>&2 2>&3)
+ 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
@@ -375,14 +366,7 @@ diskpartautoefiusb(){
}
diskpartcfdisk(){
- items=$(lsblk -d -p -n -l -o NAME -e 7,11)
- options=()
- for item in ${items}; do
- options+=("${item}" "")
- done
- device=$(whiptail --backtitle "${apptitle}" --title "${txteditparts} (cfdisk)" --menu "" 0 0 0 \
- "${options[@]}" \
- 3>&1 1>&2 2>&3)
+ device=$( selectdisk "${txteditparts} (cfdisk)" )
if [ "$?" = "0" ]; then
clear
cfdisk ${device}
@@ -390,14 +374,7 @@ diskpartcfdisk(){
}
diskpartcgdisk(){
- items=$(lsblk -d -p -n -l -o NAME -e 7,11)
- options=()
- for item in ${items}; do
- options+=("${item}" "")
- done
- device=$(whiptail --backtitle "${apptitle}" --title "${txteditparts} (cfdisk)" --menu "" 0 0 0 \
- "${options[@]}" \
- 3>&1 1>&2 2>&3)
+ device=$( selectdisk "${txteditparts} (cgdisk)" )
if [ "$?" = "0" ]; then
clear
cgdisk ${device}
@@ -749,7 +726,8 @@ installmenu(){
fi
options=()
options+=("${txteditmirrorlist}" "(${txtoptional})")
- options+=("${txtinstallarchlinux}" "pacstrap base linux")
+ options+=("${txtinstallarchlinux}" "pacstrap base kernel")
+ options+=("${txtinstallfirmware}" "(${txtoptional}) pacstrap linux-firmware")
options+=("${txtconfigarchlinux}" "")
sel=$(whiptail --backtitle "${apptitle}" --title "${txtinstallmenu}" --menu "" --cancel-button "${txtunmount}" --default-item "${nextitem}" 0 0 0 \
"${options[@]}" \
@@ -761,7 +739,12 @@ installmenu(){
nextitem="${txtinstallarchlinux}"
;;
"${txtinstallarchlinux}")
- installbase
+ if(installbase) then
+ nextitem="${txtinstallfirmware}"
+ fi
+ ;;
+ "${txtinstallfirmware}")
+ installfirmware
nextitem="${txtconfigarchlinux}"
;;
"${txtconfigarchlinux}")
@@ -777,8 +760,29 @@ installmenu(){
installbase(){
clear
- echo "pacstrap /mnt base linux"
- pacstrap /mnt base linux
+ pkgs="base"
+ options=()
+ options+=("linux" "")
+ options+=("linux-lts" "")
+ options+=("linux-zen" "")
+ options+=("linux-hardened" "")
+ sel=$(whiptail --backtitle "${apptitle}" --title "Kernel" --menu "" 0 0 0 \
+ "${options[@]}" \
+ 3>&1 1>&2 2>&3)
+ if [ "$?" = "0" ]; then
+ pkgs+=" ${sel}"
+ else
+ return 1
+ fi
+ echo "pacstrap /mnt ${pkgs}"
+ pacstrap /mnt ${pkgs}
+ pressanykey
+}
+
+installfirmware(){
+ clear
+ echo "pacstrap /mnt linux-firmware"
+ pacstrap /mnt linux-firmware
pressanykey
}
@@ -1270,14 +1274,7 @@ archgrubinstallchroot(){
}
archgrubinstallbootloader(){
- items=$(lsblk -d -p -n -l -o NAME -e 7,11)
- options=()
- for item in ${items}; do
- options+=("${item}" "")
- done
- device=$(whiptail --backtitle "${apptitle}" --title "${txtinstall//%1/bootloader}" --menu "" 0 0 0 \
- "${options[@]}" \
- 3>&1 1>&2 2>&3)
+ device=$( selectdisk "${txtinstall//%1/bootloader}" )
if [ "$?" = "0" ]; then
if [ "${eficomputer}" == "1" ]; then
options=()
@@ -1751,6 +1748,7 @@ loadstrings(){
txteditmirrorlist="Edit mirrorlist"
txtinstallarchlinux="Install Arch Linux"
+ txtinstallfirmware="Install Firmware"
txtconfigarchlinux="Config Arch Linux"
txtsethostname="Set Computer Name"
diff --git a/lng/English b/lng/English
index 36c084b..8262d77 100644
--- a/lng/English
+++ b/lng/English
@@ -60,6 +60,7 @@ txtarchinstallmenu="Arch Install Menu"
txteditmirrorlist="Edit mirrorlist"
txtinstallarchlinux="Install Arch Linux"
+txtinstallfirmware="Install Firmware"
txtconfigarchlinux="Config Arch Linux"
txtsethostname="Set Computer Name"
diff --git a/lng/French b/lng/French
index fca0614..6b914d7 100644
--- a/lng/French
+++ b/lng/French
@@ -60,6 +60,7 @@ txtarchinstallmenu="Menu Installation Arch Linux"
txteditmirrorlist="Éditer mirrorlist"
txtinstallarchlinux="Installer Arch Linux"
+txtinstallfirmware="Installer les firmwares"
txtconfigarchlinux="Configurer Arch Linux"
txtsethostname="Définir le nom de l'ordinateur"