curl -s 'https://raw.githubusercontent.com/instantOS/instantLOGO/master/ascii.txt'
echo ""
-echo "selecting fastest mirror"
# sort mirrors
pacman -Sy --noconfirm
pacman -S reflector --noconfirm
-reflector --sort rate --save /etc/pacman.d/mirrorlist
+
+echo "selecting fastest mirror"
+reflector --latest 20 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist
# install dependencies
pacman -Sy --noconfirm
+++ /dev/null
-#!/bin/bash
-
-pacman -S grub --noconfirm
\ No newline at end of file
#!/bin/bash
-grub-install --target=i386-pc $(cat /root/instantdisk) --root /mnt
\ No newline at end of file
+grub-install --target=i386-pc "$(cat /root/instantARCH/config/disk)" --root /mnt
pacman -Sy --noconfirm
echo "downloading installer dependencies"
-pacman -S --noconfirm --needed \
+
+while ! pacman -S --noconfirm --needed \
fzf \
expect \
git \
dialog \
bash \
- curl
+ curl; do
+ echo "downloading packages failed, please reconnect to internet"
+ sleep 10
+done
echo "installing additional system software"
pacman -Sy --noconfirm
-pacman -S xorg --noconfirm --needed
-pacman -S --noconfirm --needed \
+while ! pacman -S xorg --noconfirm --needed; do
+ dialog --msgbox "package installation failed \nplease reconnect to internet" 700 700
+done
+
+while ! pacman -S --noconfirm --needed \
sudo \
lightdm \
bash \
vim \
openbox \
xterm \
- lightdm-gtk-greeter
+ lightdm-gtk-greeter \
+ grub; do
+ dialog --msgbox "package installation failed \nplease reconnect to internet" 700 700
+done
mount ${DISK}1 /mnt
pacman -Sy --noconfirm
-pacstrap /mnt base linux linux-firmware
+
+while ! pacstrap /mnt base linux linux-firmware; do
+ dialog --msgbox "package installation failed \nplease reconnect to internet" 700 700
+done
genfstab -U /mnt >>/mnt/etc/fstab
chrootscript "lang/locale"
# grub: install package, install, generate config
-chrootscript "bootloader/bootloader"
escript bootloader/install
chrootscript "bootloader/config"