From 9d0a5edf574a0be8ce9518601aea5a41b794c61e Mon Sep 17 00:00:00 2001 From: Zeev Diukman Date: Sun, 18 Jan 2026 07:05:18 +0200 Subject: [PATCH] 2 --- z.sh | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/z.sh b/z.sh index 7dfd623..ec746ff 100644 --- a/z.sh +++ b/z.sh @@ -1,41 +1,38 @@ #!/bin/bash set -e - -# read user input to give btrfs seed, sprout and efi device - read -r seed sprout efi seed_device=$seed sprout_device=$sprout efi_device=$efi -# display the setup and ask if continue (y,N) echo "Seed device: /dev/$seed_device" echo "Sprout device: /dev/$sprout_device" echo "EFI device: /dev/$efi_device" -# defaults to N read -r -p "Are you sure? (y,N): " response if [[ "$response" != "y" && "$response" != "Y" ]]; then echo "Aborting." exit 1 fi - mkfs.btrfs -f -L SEED /dev/$seed_device mkfs.btrfs -f -L SPRUT /dev/$sprout_device mkfs.fat -F 32 -n EFI /dev/$efi_device echo "Filesystems created successfully." - mount -o subvol=/ /dev/vda1 /mnt - btrfs su cr /mnt/@ - umount -R /mnt - mount -o subvol=/@ /dev/vda1 /mnt - -pacstrap -K /mnt base linux dracut btrfs-progs linux-firmware sudo nano networkmanager - +# ask user to input packages to install +read -r -p "Enter packages to install (space-separated): " packages_input +packages=($packages_input) +# ask user for package installation confirmation +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." + exit 1 +fi +pacstrap -K /mnt ${packages[@]} mount -m /dev/vda3 /mnt/efi - genfstab -U /mnt > /mnt/etc/fstab - -arch-chroot /mnt /bin/bash /root/z2.sh \ No newline at end of file +arch-chroot /mnt \ No newline at end of file