artix

posix artix installation script
git clone https://git.awy.one/artix.git
Log | Files | Refs | README | LICENSE

commit 36d0aa5b304f1cd47c3e53705ebf8aed87966ecc
parent 2e4e0fe7452b9b72ce2e7fdbafb324a81cfb3f74
Author: awy <awy@awy.one>
Date:   Thu, 19 Jun 2025 12:31:41 +0300

use partprefix instead of forcing user to input nvme drives with p on the end

Diffstat:
Minstall.sh | 12++++++++++--
Mpost_chroot.sh | 6++----
2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/install.sh b/install.sh @@ -72,8 +72,16 @@ getuserdata() read -r diskdrive printf "Enter space-separated partition numbers (e.g., 5 6 for 5 boot 6 root): " read -r partitions - rootdrive="$diskdrive${partitions##* }" - bootdrive="$diskdrive${partitions%% *}" + case "$diskdrive" in + nvme[0-9]*n[0-9]* | mmcblk[0-9]*) + partprefix="p" + ;; + *) + partprefix="" + ;; + esac + rootdrive="$diskdrive$partprefix${partitions##* }" + bootdrive="$diskdrive$partprefix${partitions%% *}" while true; do clear printf "Your CPU Vendor detected as %s, is that right? Y/N: " "$cpuvendor" diff --git a/post_chroot.sh b/post_chroot.sh @@ -62,8 +62,7 @@ EOL 2) pacman -S linux-zen-headers --noconfirm ;; *) printf "Invalid kernel" && exit 1 ;; esac - _diskdrivewop="${diskdrive%p}" - efibootmgr -c -d /dev/"$_diskdrivewop" -p "${partitions%% *}" -L "linux" -l '\EFI\BOOT\BOOTX64.EFI' + efibootmgr -c -d /dev/"$diskdrive" -p "${partitions%% *}" -L "linux" -l '\EFI\BOOT\BOOTX64.EFI' } customkernel() @@ -89,8 +88,7 @@ customkernel() make headers_install mkdir -p /boot/EFI/BOOT cp arch/x86/boot/bzImage /boot/EFI/BOOT/BOOTX64.EFI - _diskdrivewop="${diskdrive%p}" - efibootmgr -c -d /dev/"$_diskdrivewop" -p "${partitions%% *}" -L "linux" -l '\EFI\BOOT\BOOTX64.EFI' + efibootmgr -c -d /dev/"$diskdrive" -p "${partitions%% *}" -L "linux" -l '\EFI\BOOT\BOOTX64.EFI' } case $kerneltype in