Fix reflector & add repo clone

pull/2/head
beech 5 months ago
parent ed98a5506f
commit 1a83a00676
  1. 5
      install1.sh
  2. 11
      install2.sh

@ -81,7 +81,10 @@ cat > /etc/pacman.d/mirrorlist << 'EOF'
## Generated on install ## Generated on install
## ##
EOF EOF
reflector -a 48 -c "US" -f 5 -l 20 --sort rate --save /etc/pacman.d/mirrorlist if ! reflector -a 48 -c "US" -f 5 -l 20 --sort rate --save /etc/pacman.d/mirrorlist || ! grep -q "^Server" /etc/pacman.d/mirrorlist; then
echo "Warning: reflector failed or produced empty mirrorlist, restoring backup mirrorlist"
cp /etc/pacman.d/mirrorlist.backup /etc/pacman.d/mirrorlist
fi
# install arch # install arch
echo "-------------------------------------------------" echo "-------------------------------------------------"

@ -75,6 +75,17 @@ sudo pacman -S base-devel linux-headers --noconfirm --needed
sudo systemctl enable NetworkManager.service sudo systemctl enable NetworkManager.service
sudo systemctl start NetworkManager.service sudo systemctl start NetworkManager.service
echo "-------------------------------------------------"
echo "Cloning ArchScripts repository"
echo "-------------------------------------------------"
if [ -n "$Username" ]; then
cd /home/$Username
sudo -u $Username git clone https://git.merlinslair.net/beech/ArchScripts.git 2>/dev/null || true
echo "ArchScripts repository cloned to /home/$Username/ArchScripts"
else
echo "Username not set, skipping repo clone"
fi
umount /sys/firmware/efi/efivars/ 2>/dev/null || true umount /sys/firmware/efi/efivars/ 2>/dev/null || true
echo "-------------------------------------------------" echo "-------------------------------------------------"