This commit is contained in:
Zeev Diukman 2026-01-18 07:26:51 +02:00
parent 762aff0c9d
commit 20a9999ccd

14
z.sh
View file

@ -31,13 +31,17 @@ umount -R /mnt
mount -o subvol=/@ /dev/vda1 /mnt
# ask user to input packages to install
read -r -p "Enter packages to install (space-separated): " packages_input
# convert input string to array
packages=($packages_input)
# ask user for package installation confirmation
if [[ ${#packages[@]} -eq 0 ]]; then
$packages=("base" "linux" "linux-firmware" "vim" "git" "networkmanager" "btrfs-progs" "efibootmgr" "grub" "os-prober" "base-devel" "sudo")
echo "No packages specified. Defaulting to: ${packages[@]}"
else
echo "The following packages will be installed: ${packages[@]}"
# ask user for confirmation before proceeding
read -r -p "Continue with installation? (y,N): " response
if [[ "$response" != "y" && "$response" != "Y" ]]; then
echo "Installation aborted."
fi
read -r -p "Continue with installation? (Yes/no): " response
if [[ "$response" == "n" || "$response" == "N" ]]; then
echo "Aborting."
exit 1
fi
pacstrap -K /mnt ${packages[@]}