Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the script with new versions of software #230

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 65 additions & 65 deletions archfi
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ mainmenu(){
fi
options=()
options+=("${txtlanguage}" "Language")
options+=("${txtsetkeymap}" "(loadkeys ...)")
options+=("${txteditor}" "(${txtoptional})")
options+=("${txtsetkeymap}" "loadkeys ...")
options+=("${txteditor}" "${txtoptional}")
options+=("${txtdiskpartmenu}" "")
options+=("${txtselectpartsmenu}" "")
options+=("" "")
Expand Down Expand Up @@ -109,7 +109,7 @@ chooselanguage(){
eval $(setfont ${font})
fi
font=
if [ "$(cat /etc/locale.gen | grep ""#${locale}"")" != "" ]; then
if [ "$(cat /etc/locale.gen | grep "#${locale}")" != "" ]; then
sed -i "/#${locale}/s/^#//g" /etc/locale.gen
locale-gen
fi
Expand Down Expand Up @@ -195,44 +195,44 @@ diskpartmenu(){
fi
options=()
if [ "${eficomputer}" == "0" ]; then
options+=("${txtautoparts} (gpt)" "")
options+=("${txtautoparts} (dos)" "")
options+=("${txtautoparts} gpt" "")
options+=("${txtautoparts} dos" "")
else
options+=("${txtautoparts} (gpt,efi)" "")
options+=("${txtautoparts} (gpt)" "")
options+=("${txtautoparts} (dos)" "")
options+=("${txtautoparts} (gpt,bios+efi,noswap)" "")
options+=("${txtautoparts} gpt,efi" "")
options+=("${txtautoparts} gpt" "")
options+=("${txtautoparts} dos" "")
options+=("${txtautoparts} gpt,bios+efi,noswap" "")
fi
options+=("${txteditparts} (cfdisk)" "")
options+=("${txteditparts} (cgdisk)" "")
options+=("${txteditparts} cfdisk" "")
options+=("${txteditparts} cgdisk" "")
sel=$(dialog --backtitle "${apptitle}" --title "${txtdiskpartmenu}" --cancel-button "${txtback}" --default-item "${nextitem}" --menu "" 0 0 0 \
"${options[@]}" \
3>&1 1>&2 2>&3)
if [ "$?" = "0" ]; then
case ${sel} in
"${txtautoparts} (dos)")
"${txtautoparts} dos")
diskpartautodos
nextitem="${txtautoparts} (dos)"
nextitem="${txtautoparts} dos"
;;
"${txtautoparts} (gpt)")
"${txtautoparts} gpt")
diskpartautogpt
nextitem="${txtautoparts} (gpt)"
nextitem="${txtautoparts} gpt"
;;
"${txtautoparts} (gpt,efi)")
"${txtautoparts} gpt,efi")
diskpartautoefi
nextitem="${txtautoparts} (gpt,efi)"
nextitem="${txtautoparts} gpt,efi"
;;
"${txtautoparts} (gpt,bios+efi,noswap)")
"${txtautoparts} gpt,bios+efi,noswap")
diskpartautoefiusb
nextitem="${txtautoparts} (gpt,bios+efi,noswap)"
nextitem="${txtautoparts} gpt,bios+efi,noswap"
;;
"${txteditparts} (cfdisk)")
"${txteditparts} cfdisk")
diskpartcfdisk
nextitem="${txteditparts} (cfdisk)"
nextitem="${txteditparts} cfdisk"
;;
"${txteditparts} (cgdisk)")
"${txteditparts} cgdisk")
diskpartcgdisk
nextitem="${txteditparts} (cgdisk)"
nextitem="${txteditparts} cgdisk"
;;
esac
diskpartmenu "${nextitem}"
Expand All @@ -241,9 +241,9 @@ diskpartmenu(){


diskpartautodos(){
device=$(selectdisk "${txtautoparts} (dos)")
device=$(selectdisk "${txtautoparts} dos")
if [ "$?" = "0" ]; then
if (dialog --backtitle "${apptitle}" --title "${txtautoparts} (dos)" --defaultno --yesno "${txtautopartsconfirm//%1/${device}}" 0 0) then
if (dialog --backtitle "${apptitle}" --title "${txtautoparts} dos" --defaultno --yesno "${txtautopartsconfirm//%1/${device}}" 0 0) then
clear
echo "${txtautopartclear}"
parted ${device} mklabel msdos
Expand Down Expand Up @@ -276,9 +276,9 @@ diskpartautodos(){
}

diskpartautogpt(){
device=$(selectdisk "${txtautoparts} (gpt)")
device=$(selectdisk "${txtautoparts} gpt")
if [ "$?" = "0" ]; then
if (dialog --backtitle "${apptitle}" --title "${txtautoparts} (gpt)" --defaultno --yesno "${txtautopartsconfirm//%1/${device}}" 0 0) then
if (dialog --backtitle "${apptitle}" --title "${txtautoparts} gpt" --defaultno --yesno "${txtautopartsconfirm//%1/${device}}" 0 0) then
clear
echo "${txtautopartclear}"
parted ${device} mklabel gpt
Expand Down Expand Up @@ -309,9 +309,9 @@ diskpartautogpt(){
}

diskpartautoefi(){
device=$(selectdisk "${txtautoparts} (gpt,efi)")
device=$(selectdisk "${txtautoparts} gpt,efi")
if [ "$?" = "0" ]; then
if (dialog --backtitle "${apptitle}" --title "${txtautoparts} (gpt,efi)" --defaultno --yesno "${txtautopartsconfirm//%1/${device}}" 0 0) then
if (dialog --backtitle "${apptitle}" --title "${txtautoparts} gpt,efi" --defaultno --yesno "${txtautopartsconfirm//%1/${device}}" 0 0) then
clear
echo "${txtautopartclear}"
parted ${device} mklabel gpt
Expand Down Expand Up @@ -340,9 +340,9 @@ diskpartautoefi(){
}

diskpartautoefiusb(){
device=$(selectdisk "${txtautoparts} (gpt,efi)")
device=$(selectdisk "${txtautoparts} gpt,efi")
if [ "$?" = "0" ]; then
if (dialog --backtitle "${apptitle}" --title "${txtautoparts} (gpt,efi)" --defaultno --yesno "${txtautopartsconfirm//%1/${device}}" 0 0) then
if (dialog --backtitle "${apptitle}" --title "${txtautoparts} gpt,efi" --defaultno --yesno "${txtautopartsconfirm//%1/${device}}" 0 0) then
clear
echo "${txtautopartclear}"
parted ${device} mklabel gpt
Expand Down Expand Up @@ -371,15 +371,15 @@ diskpartautoefiusb(){
}

diskpartcfdisk(){
device=$( selectdisk "${txteditparts} (cfdisk)" )
device=$( selectdisk "${txteditparts} cfdisk" )
if [ "$?" = "0" ]; then
clear
cfdisk ${device}
fi
}

diskpartcgdisk(){
device=$( selectdisk "${txteditparts} (cgdisk)" )
device=$( selectdisk "${txteditparts} cgdisk" )
if [ "$?" = "0" ]; then
clear
cgdisk ${device}
Expand Down Expand Up @@ -442,10 +442,10 @@ selectparts(){
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"
msg=${msg}"boot : "${bootdev}\n"
msg=${msg}"swap : "${swapdev}\n"
msg=${msg}"root : "${rootdev}\n"
msg=${msg}"home : "${homedev}\n\n"
if (dialog --backtitle "${apptitle}" --title "${txtselectpartsmenu}" --yesno "${msg}" 0 0) then
isnvme=0
if [ "${bootdev::8}" == "/dev/nvm" ]; then
Expand Down Expand Up @@ -737,10 +737,10 @@ installmenu(){
nextitem=${1}
fi
options=()
#options+=("${txtselectmirrorsbycountry}" "(${txtoptional})")
options+=("${txteditmirrorlist}" "(${txtoptional})")
options+=("${txtfiltermirrorlist}" "reflector (${txtoptional})")
options+=("${txtparalleldownloads}" "(${txtoptional})")
#options+=("${txtselectmirrorsbycountry}" "${txtoptional}")
options+=("${txteditmirrorlist}" "${txtoptional}")
options+=("${txtfiltermirrorlist}" "reflector ${txtoptional}")
options+=("${txtparalleldownloads}" "${txtoptional}")
options+=("${txtinstallarchlinux}" "pacstrap")
options+=("${txtconfigarchlinux}" "")
sel=$(dialog --backtitle "${apptitle}" --title "${txtinstallmenu}" --cancel-button "${txtunmount}" --default-item "${nextitem}" --menu "" 0 0 0 \
Expand Down Expand Up @@ -857,7 +857,7 @@ installbase(){
fi

options=()
options+=("linux-firmware" "(${txtoptional})" on)
options+=("linux-firmware" "${txtoptional}" on)
sel=$(dialog --backtitle "${apptitle}" --title "${txtinstallarchlinuxfirmwares}" --checklist "" 0 0 0 \
"${options[@]}" \
3>&1 1>&2 2>&3)
Expand Down Expand Up @@ -962,7 +962,7 @@ archmenu(){
options=()
options+=("${txtsethostname}" "/etc/hostname")
options+=("${txtsetkeymap}" "/etc/vconsole.conf")
options+=("${txtsetfont}" "/etc/vconsole.conf (${txtoptional})")
options+=("${txtsetfont}" "/etc/vconsole.conf ${txtoptional}")
options+=("${txtsetlocale}" "/etc/locale.conf, /etc/locale.gen")
options+=("${txtsettime}" "/etc/localtime")
options+=("${txtsetrootpassword}" "")
Expand All @@ -971,15 +971,15 @@ archmenu(){
options+=("${txtgenerate//%1/crypttab}" "")
fi
if [ "${luksroot}" = "1" ]; then
options+=("${txtgenerate//%1/mkinitcpio.conf-luks}" "(encrypt hooks)")
options+=("${txtgenerate//%1/mkinitcpio.conf-luks}" "encrypt hooks")
fi
if [ "${isnvme}" = "1" ]; then
options+=("${txtgenerate//%1/mkinitcpio.conf-nvme}" "(nvme module)")
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+=("${txtedit//%1/fstab}" "${txtoptional}")
options+=("${txtedit//%1/crypttab}" "${txtoptional}")
options+=("${txtedit//%1/mkinitcpio.conf}" "${txtoptional}")
options+=("${txtedit//%1/mirrorlist}" "${txtoptional}")
options+=("${txtbootloader}" "")
options+=("${txtextrasmenu}" "")
options+=("archdi" "${txtarchdidesc}")
Expand Down Expand Up @@ -1141,7 +1141,7 @@ archsetfont(){
for item in ${items}; do
options+=("${item%%.*}" "")
done
vcfont=$(dialog --backtitle "${apptitle}" --title "${txtsetfont} (${txtoptional})" --menu "" 0 0 0 \
vcfont=$(dialog --backtitle "${apptitle}" --title "${txtsetfont} ${txtoptional}" --menu "" 0 0 0 \
"${options[@]}" \
3>&1 1>&2 2>&3)
if [ "$?" = "0" ]; then
Expand Down Expand Up @@ -1378,7 +1378,7 @@ archbootloadergrubmenu(){
fi
options=()
options+=("${txtinstall//%1/grub}" "pacstrap grub (efibootmgr), grub-mkconfig")
options+=("${txtedit//%1/grub}" "(${txtoptional})")
options+=("${txtedit//%1/grub}" "${txtoptional}")
options+=("${txtinstall//%1/bootloader}" "grub-install")
sel=$(dialog --backtitle "${apptitle}" --title "${txtbootloadergrubmenu}" --cancel-button "${txtback}" --default-item "${nextblitem}" --menu "" 0 0 0 \
"${options[@]}" \
Expand Down Expand Up @@ -1434,7 +1434,7 @@ archgrubinstall(){
if [ "${luksroot}" = "1" ]; then
if (dialog --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"
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
Expand Down Expand Up @@ -1532,7 +1532,7 @@ archbootloadersyslinuxbmenu(){
fi
options=()
options+=("${txtinstall//%1/syslinux}" "pacstrap syslinux (gptfdisk,mtools)")
options+=("${txtedit//%1/syslinux}" "(${txtoptional})")
options+=("${txtedit//%1/syslinux}" "${txtoptional}")
options+=("${txtinstall//%1/bootloader}" "syslinux-install_update")
sel=$(dialog --backtitle "${apptitle}" --title "${txtbootloadersyslinuxmenu}" --cancel-button "${txtback}" --default-item "${nextblitem}" --menu "" 0 0 0 \
"${options[@]}" \
Expand Down Expand Up @@ -1589,11 +1589,11 @@ archsyslinuxinstall(){
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
echo "sed -i \"s/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
echo "sed -i \"s/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
Expand Down Expand Up @@ -1643,8 +1643,8 @@ archbootloadersystemdbmenu(){
fi
options=()
options+=("${txtinstall//%1/systemd-boot}" "bootctl install")
options+=("${txtedit//%1/loader.conf}" "(${txtoptional})")
options+=("${txtedit//%1/entries}" "(${txtoptional})")
options+=("${txtedit//%1/loader.conf}" "${txtoptional}")
options+=("${txtedit//%1/entries}" "${txtoptional}")
sel=$(dialog --backtitle "${apptitle}" --title "${txtbootloadersystemdmenu}" --cancel-button "${txtback}" --default-item "${nextblitem}" --menu "" 0 0 0 \
"${options[@]}" \
3>&1 1>&2 2>&3)
Expand Down Expand Up @@ -1678,7 +1678,7 @@ archsystemdinstall(){
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/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
Expand Down Expand Up @@ -1728,7 +1728,7 @@ archbootloaderrefindmenu(){
fi
options=()
options+=("${txtinstall//%1/refind}" "pacstrap refind-efi")
options+=("${txtedit//%1/refind_linux.conf}" "(${txtoptional})")
options+=("${txtedit//%1/refind_linux.conf}" "${txtoptional}")
sel=$(dialog --backtitle "${apptitle}" --title "${txtbootloaderrefindmenu}" --cancel-button "${txtback}" --default-item "${nextblitem}" --menu "" 0 0 0 \
"${options[@]}" \
3>&1 1>&2 2>&3)
Expand All @@ -1752,9 +1752,9 @@ archrefindinstall(){

echo "pacstrap /mnt refind"
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 "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}
Expand Down Expand Up @@ -1842,7 +1842,7 @@ archdidownload(){
txtselectserver="Select source server :"
txtback="Back"
options=()
options+=("sourceforge.net" " (Recommended)")
options+=("sourceforge.net" " Recommended")
options+=("github.com" "")
sel=$(dialog --backtitle "${apptitle}" --title "${txtselectserver}" --cancel-button "${txtback}" --menu "" 0 0 0 \
"${options[@]}" \
Expand Down