Skip to content
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
18 changes: 9 additions & 9 deletions arch-installer/arch-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ prepare_drives() {
elif [ "$PART" == "Return To Menu" ]; then
main_menu
elif [ "$PART" == "Auto partition encrypted LVM" ] || [ "$PART" == "Auto Partition Drive" ]; then
if (whiptail --title "Arch Linux Installer" --defaultno --yesno "WARNING! Will erase all data on /dev/$DRIVE! \n Would you like to contunue?" 10 60) then
if (whiptail --title "Arch Linux Installer" --defaultno --yesno "WARNING! Will erase all data on /dev/$DRIVE! \n Would you like to continue?" 10 60) then
sgdisk --zap-all "$DRIVE"
else
prepare_drives
Expand All @@ -125,7 +125,7 @@ prepare_drives() {
SWAP=true
swapped=true
else
whiptail --title "Arch Linux Installer" --msgbox "Error not enough space on drive!" 10 60
whiptail --title "Arch Linux Installer" --msgbox "Error: not enough space on drive!" 10 60
fi
elif [ "$unit" == "G" ]; then
unit_size=$(grep -o '[0-9]*' <<< "$SWAPSPACE")
Expand All @@ -134,7 +134,7 @@ prepare_drives() {
SWAP=true
swapped=true
else
whiptail --title "Arch Linux Installer" --msgbox "Error not enough space on drive!" 10 60
whiptail --title "Arch Linux Installer" --msgbox "Error: not enough space on drive!" 10 60
fi
else
whiptail --title "Arch Linux Installer" --msgbox "Error setting swap! Be sure it is a number ending in 'M' or 'G'" 10 60
Expand Down Expand Up @@ -281,7 +281,7 @@ prepare_drives() {
if [ "$?" -eq "0" ]; then
mounted=true
else
whiptail --title "Arch Linux Installer" --msgbox "An error was detected during partitioning \n Returing partitioning menu" 10 60
whiptail --title "Arch Linux Installer" --msgbox "An error was detected during partitioning \n Returning to partitioning menu" 10 60
prepare_drives
fi
else
Expand Down Expand Up @@ -317,19 +317,19 @@ prepare_drives() {
;;
esac
if [ "$mounted" != "true" ]; then
whiptail --title "Arch Linux Installer" --msgbox "An error was detected during partitioning \n Returing to drive partitioning" 10 60
whiptail --title "Arch Linux Installer" --msgbox "An error was detected during partitioning \n Returning to drive partitioning" 10 60
prepare_drives
fi
clear
update_mirrors
}

update_mirrors() {
countries=$(echo -e "AT Austria\n AU Australia\n BE Belgium\n BG Bulgaria\n BR Brazil\n BY Belarus\n CA Canada\n CL Chile \n CN China\n CO Columbia\n CZ Czech-Republic\n DK Denmark\n EE Estonia\n ES Spain\n FI Finland\n FR France\n GB United-Kingdom\n HU Hungary\n IE Ireland\n IL Isreal\n IN India\n IT Italy\n JP Japan\n KR Korea\n KZ Kazakhstan\n LK Sri-Lanka\n LU Luxembourg\n LV Lativia\n MK Macedonia\n NC New-Caledonia\n NL Netherlands\n NO Norway\n NZ New-Zealand\n PL Poland\n PT Portugal\n RO Romania\n RS Serbia\n RU Russia\n SE Sweden\n SG Singapore\n SK Slovakia\n TR Turkey\n TW Taiwan\n UA Ukraine\n US United-States\n UZ Uzbekistan\n VN Viet-Nam\n ZA South-Africa")
countries=$(echo -e "AT Austria\n AU Australia\n BE Belgium\n BG Bulgaria\n BR Brazil\n BY Belarus\n CA Canada\n CL Chile \n CN China\n CO Columbia\n CZ Czech-Republic\n DE Germany\n DK Denmark\n EE Estonia\n ES Spain\n FI Finland\n FR France\n GB United-Kingdom\n HU Hungary\n IE Ireland\n IL Isreal\n IN India\n IT Italy\n JP Japan\n KR Korea\n KZ Kazakhstan\n LK Sri-Lanka\n LU Luxembourg\n LV Latvia\n MK Macedonia\n NC New-Caledonia\n NL Netherlands\n NO Norway\n NZ New-Zealand\n PL Poland\n PT Portugal\n RO Romania\n RS Serbia\n RU Russia\n SE Sweden\n SG Singapore\n SK Slovakia\n TR Turkey\n TW Taiwan\n UA Ukraine\n US United-States\n UZ Uzbekistan\n VN Vietnam\n ZA South-Africa")
if (whiptail --title "Arch Linux Installer" --yesno "Would you like to update your mirrorlist now?" 10 60) then
code=$(whiptail --nocancel --title "Arch Linux Installer" --menu "Select your country code:" 15 60 5 $countries 3>&1 1>&2 2>&3)
wget --append-output=/dev/null "https://www.archlinux.org/mirrorlist/?country=$code&protocol=http" -O /etc/pacman.d/mirrorlist.bak &
pid=$! pri=0.5 msg="Retreiving new mirrorlist..." load
pid=$! pri=0.5 msg="Retrieving new mirrorlist..." load
sed -i 's/#//' /etc/pacman.d/mirrorlist.bak
rankmirrors -n 6 /etc/pacman.d/mirrorlist.bak > /etc/pacman.d/mirrorlist &
pid=$! pri=0.5 msg="Please wait while ranking mirrors" load
Expand Down Expand Up @@ -473,7 +473,7 @@ add_user() {
chmod +x "$ARCH"/root/set.sh
arch-chroot "$ARCH" ./root/set.sh
rm "$ARCH"/root/set.sh
if (whiptail --title "Arch Linux Installer" --yesno "Enable sudo privelege for members of wheel?" 10 60) then
if (whiptail --title "Arch Linux Installer" --yesno "Enable sudo privilege for members of wheel?" 10 60) then
sed -i '/%wheel ALL=(ALL) ALL/s/^#//' $ARCH/etc/sudoers
fi
user_added=true
Expand Down Expand Up @@ -887,7 +887,7 @@ main_menu() {
;;
"Partition Drive")
if [ "$mounted" == "true" ]; then
whiptail --title "Arch Linux Installer" --msgbox "Drive already mounted, try install base system \n returning to menu" 10 60
whiptail --title "Arch Linux Installer" --msgbox "Drive already mounted, try installing base system \n returning to menu" 10 60
main_menu
fi
prepare_drives
Expand Down