# sort mirrors
pacman -Sy --noconfirm
-if command -v pacstrap; then
- pacman -S reflector --noconfirm
- echo "selecting fastest mirror"
- reflector --latest 40 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist
-fi
-# install dependencies
-pacman -Sy --noconfirm
pacman -S git --noconfirm --needed
cd /root
else
echo "ranking mirrors"
reflector --latest 40 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist
+ iroot automirror 1
fi
}
echo "downloading packages failed, please reconnect to internet"
sleep 10
- # download new mirrors if on arch
- if command -v reflector; then
- reflector --latest 40 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist
- else
- pacman-mirrors --geoip
+ if iroot automirror; then
+ # download new mirrors if on arch
+ if command -v reflector; then
+ reflector --latest 40 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist
+ else
+ pacman-mirrors --geoip
+ fi
fi
pacman -Sy --noconfirm
while ! pacman -S xorg --noconfirm --needed; do
dialog --msgbox "package installation failed \nplease reconnect to internet" 700 700
- command -v reflector && --latest 40 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist
+ iroot automirror && command -v reflector &&
+ reflector --latest 40 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist
+
done
while ! pacman -S --noconfirm --needed \
done
fi
-
if command -v genfstab; then
genfstab -U /mnt >>/mnt/etc/fstab
else
fi
cd /root
cp -r ./instantARCH /mnt/root/instantARCH
+cat /etc/pacman.d/mirrorlist >/mnt/etc/pacman.d/mirrorlist
pacman -Sy --noconfirm
-if ! command -v mhwd; then
- pacman -S reflector --noconfirm --needed
- echo "selecting fastest mirror"
- reflector --latest 40 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist
- pacman -Sy --noconfirm
-fi
+# todo: askmirrors
pacman -S git --noconfirm --needed
# do all actions requiring user input first
./topask.sh
+if ! command -v mhwd && iroot automirror; then
+ pacman -S reflector --noconfirm --needed
+ echo "selecting fastest mirror"
+ reflector --latest 40 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist
+ pacman -Sy --noconfirm
+fi
+
./init/init.sh
pacman -S --noconfirm --needed base \