shellcheck step 0

This commit is contained in:
Jesús 2022-05-24 07:53:38 +08:00
parent 7c908d5f68
commit d458a57e56
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766

154
hyperfi
View File

@ -130,7 +130,7 @@ setkeymap(){
if [ "$?" = "0" ]; then if [ "$?" = "0" ]; then
clear clear
echo "loadkeys ${keymap}" echo "loadkeys ${keymap}"
loadkeys ${keymap} loadkeys "${keymap}"
pressanykey pressanykey
fi fi
} }
@ -179,7 +179,7 @@ selectdisk(){
then then
return 1 return 1
fi fi
echo ${result%%\ *} echo "${result%%\ *}"
return 0 return 0
} }
@ -242,18 +242,18 @@ diskpartautodos(){
if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (dos)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0); then if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (dos)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0); then
clear clear
echo "${txtautopartclear}" echo "${txtautopartclear}"
parted ${device} mklabel msdos parted "${device}" mklabel msdos
sleep 1 sleep 1
echo "${txtautopartcreate//%1/boot}" echo "${txtautopartcreate//%1/boot}"
echo -e "n\np\n\n\n+512M\na\nw" | fdisk ${device} echo -e "n\np\n\n\n+512M\na\nw" | fdisk "${device}"
sleep 1 sleep 1
echo "${txtautopartcreate//%1/swap}" echo "${txtautopartcreate//%1/swap}"
swapsize=$(grep MemTotal /proc/meminfo | awk '{ print $2 }') swapsize=$(grep MemTotal /proc/meminfo | awk '{ print $2 }')
swapsize=$((swapsize/1000))"M" swapsize=$((swapsize/1000))"M"
echo -e "n\np\n\n\n+${swapsize}\nt\n\n82\nw" | fdisk ${device} echo -e "n\np\n\n\n+${swapsize}\nt\n\n82\nw" | fdisk "${device}"
sleep 1 sleep 1
echo "${txtautopartcreate//%1/root}" echo "${txtautopartcreate//%1/root}"
echo -e "n\np\n\n\n\nw" | fdisk ${device} echo -e "n\np\n\n\n\nw" | fdisk "${device}"
sleep 1 sleep 1
echo "" echo ""
pressanykey pressanykey
@ -277,17 +277,17 @@ diskpartautogpt(){
if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0); then if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0); then
clear clear
echo "${txtautopartclear}" echo "${txtautopartclear}"
parted ${device} mklabel gpt parted "${device}" mklabel gpt
echo "${txtautopartcreate//%1/BIOS boot}" echo "${txtautopartcreate//%1/BIOS boot}"
sgdisk ${device} -n=1:0:+31M -t=1:ef02 sgdisk "${device}" -n=1:0:+31M -t=1:ef02
echo "${txtautopartcreate//%1/boot}" echo "${txtautopartcreate//%1/boot}"
sgdisk ${device} -n=2:0:+512M sgdisk "${device}" -n=2:0:+512M
echo "${txtautopartcreate//%1/swap}" echo "${txtautopartcreate//%1/swap}"
swapsize=$(grep MemTotal /proc/meminfo | awk '{ print $2 }') swapsize=$(grep MemTotal /proc/meminfo | awk '{ print $2 }')
swapsize=$((swapsize/1000))"M" swapsize=$((swapsize/1000))"M"
sgdisk ${device} -n=3:0:+${swapsize} -t=3:8200 sgdisk "${device}" -n=3:0:+${swapsize} -t=3:8200
echo "${txtautopartcreate//%1/root}" echo "${txtautopartcreate//%1/root}"
sgdisk ${device} -n=4:0:0 sgdisk "${device}" -n=4:0:0
echo "" echo ""
pressanykey pressanykey
if [ "${device::8}" == "/dev/nvm" ]; then if [ "${device::8}" == "/dev/nvm" ]; then
@ -310,15 +310,15 @@ diskpartautoefi(){
if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt,efi)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0); then if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt,efi)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0); then
clear clear
echo "${txtautopartclear}" echo "${txtautopartclear}"
parted ${device} mklabel gpt parted "${device}" mklabel gpt
echo "${txtautopartcreate//%1/EFI boot}" echo "${txtautopartcreate//%1/EFI boot}"
sgdisk ${device} -n=1:0:+1024M -t=1:ef00 sgdisk "${device}" -n=1:0:+1024M -t=1:ef00
echo "${txtautopartcreate//%1/swap}" echo "${txtautopartcreate//%1/swap}"
swapsize=$(grep MemTotal /proc/meminfo | awk '{ print $2 }') swapsize=$(grep MemTotal /proc/meminfo | awk '{ print $2 }')
swapsize=$((swapsize/1000))"M" swapsize=$((swapsize/1000))"M"
sgdisk ${device} -n=3:0:+${swapsize} -t=3:8200 sgdisk "${device}" -n=3:0:+${swapsize} -t=3:8200
echo "${txtautopartcreate//%1/root}" echo "${txtautopartcreate//%1/root}"
sgdisk ${device} -n=4:0:0 sgdisk "${device}" -n=4:0:0
echo "" echo ""
pressanykey pressanykey
if [ "${device::8}" == "/dev/nvm" ]; then if [ "${device::8}" == "/dev/nvm" ]; then
@ -341,13 +341,13 @@ diskpartautoefiusb(){
if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt,efi)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0); then if (whiptail --backtitle "${apptitle}" --title "${txtautoparts} (gpt,efi)" --yesno "${txtautopartsconfirm//%1/${device}}" --defaultno 0 0); then
clear clear
echo "${txtautopartclear}" echo "${txtautopartclear}"
parted ${device} mklabel gpt parted "${device}" mklabel gpt
echo "${txtautopartcreate//%1/EFI boot}" echo "${txtautopartcreate//%1/EFI boot}"
sgdisk ${device} -n=1:0:+1024M -t=1:ef00 sgdisk "${device}" -n=1:0:+1024M -t=1:ef00
echo "${txtautopartcreate//%1/BIOS boot}" echo "${txtautopartcreate//%1/BIOS boot}"
sgdisk ${device} -n=3:0:+31M -t=3:ef02 sgdisk "${device}" -n=3:0:+31M -t=3:ef02
echo "${txtautopartcreate//%1/root}" echo "${txtautopartcreate//%1/root}"
sgdisk ${device} -n=4:0:0 sgdisk "${device}" -n=4:0:0
echo "${txthybridpartcreate}" echo "${txthybridpartcreate}"
echo -e "r\nh\n3\nN\n\nY\nN\nw\nY\n" | gdisk ${device} echo -e "r\nh\n3\nN\n\nY\nN\nw\nY\n" | gdisk ${device}
echo "" echo ""
@ -370,7 +370,7 @@ diskpartcfdisk(){
device=$( selectdisk "${txteditparts} (cfdisk)" ) device=$( selectdisk "${txteditparts} (cfdisk)" )
if [ "$?" = "0" ]; then if [ "$?" = "0" ]; then
clear clear
cfdisk ${device} cfdisk "${device}"
fi fi
} }
@ -378,7 +378,7 @@ diskpartcgdisk(){
device=$( selectdisk "${txteditparts} (cgdisk)" ) device=$( selectdisk "${txteditparts} (cgdisk)" )
if [ "$?" = "0" ]; then if [ "$?" = "0" ]; then
clear clear
cgdisk ${device} cgdisk "${device}"
fi fi
} }
# -------------------------------------------------------- # --------------------------------------------------------
@ -490,14 +490,14 @@ formatdevices(){
if (whiptail --backtitle "${apptitle}" --title "${txtformatdevices}" --yesno "${txtformatdeviceconfirm}" --defaultno 0 0); then if (whiptail --backtitle "${apptitle}" --title "${txtformatdevices}" --yesno "${txtformatdeviceconfirm}" --defaultno 0 0); then
fspkgs="" fspkgs=""
if [ ! "${bootdev}" = "" ]; then if [ ! "${bootdev}" = "" ]; then
formatbootdevice boot ${bootdev} formatbootdevice boot "${bootdev}"
fi fi
if [ ! "${swapdev}" = "" ]; then if [ ! "${swapdev}" = "" ]; then
formatswapdevice swap ${swapdev} formatswapdevice swap" ${swapdev}"
fi fi
formatdevice root ${rootdev} formatdevice root "${rootdev}"
if [ ! "${homedev}" = "" ]; then if [ ! "${homedev}" = "" ]; then
formatdevice home ${homedev} formatdevice home "${homedev}"
fi fi
fi fi
} }
@ -524,20 +524,20 @@ formatbootdevice(){
case ${sel} in case ${sel} in
ext2) ext2)
echo "mkfs.ext2 ${2}" echo "mkfs.ext2 ${2}"
mkfs.ext2 ${2} mkfs.ext2 "${2}"
;; ;;
ext3) ext3)
echo "mkfs.ext3 ${2}" echo "mkfs.ext3 ${2}"
mkfs.ext3 ${2} mkfs.ext3 "${2}"
;; ;;
ext4) ext4)
echo "mkfs.ext4 ${2}" echo "mkfs.ext4 ${2}"
mkfs.ext4 ${2} mkfs.ext4 "${2}"
;; ;;
fat32) fat32)
fspkgs="${fspkgs[@]} dosfstools" fspkgs="${fspkgs[@]} dosfstools"
echo "mkfs.fat ${2}" echo "mkfs.fat ${2}"
mkfs.fat ${2} mkfs.fat "${2}"
;; ;;
esac esac
echo "" echo ""
@ -558,7 +558,7 @@ formatswapdevice(){
case ${sel} in case ${sel} in
swap) swap)
echo "mkswap ${swapdev}" echo "mkswap ${swapdev}"
mkswap ${swapdev} mkswap "${swapdev}"
echo "" echo ""
pressanykey pressanykey
;; ;;
@ -591,13 +591,13 @@ formatdevice(){
btrfs) btrfs)
fspkgs="${fspkgs[@]} btrfs-progs" fspkgs="${fspkgs[@]} btrfs-progs"
echo "mkfs.btrfs -f ${2}" echo "mkfs.btrfs -f ${2}"
mkfs.btrfs -f ${2} mkfs.btrfs -f "${2}"
if [ "${1}" = "root" ]; then if [ "${1}" = "root" ]; then
echo "mount ${2} /mnt" echo "mount ${2} /mnt"
echo "btrfs subvolume create /mnt/root" echo "btrfs subvolume create /mnt/root"
echo "btrfs subvolume set-default /mnt/root" echo "btrfs subvolume set-default /mnt/root"
echo "umount /mnt" echo "umount /mnt"
mount ${2} /mnt mount "${2}" /mnt
btrfs subvolume create /mnt/root btrfs subvolume create /mnt/root
btrfs subvolume set-default /mnt/root btrfs subvolume set-default /mnt/root
umount /mnt umount /mnt
@ -605,40 +605,40 @@ formatdevice(){
;; ;;
ext4) ext4)
echo "mkfs.ext4 ${2}" echo "mkfs.ext4 ${2}"
mkfs.ext4 ${2} mkfs.ext4 "${2}"
;; ;;
ext3) ext3)
echo "mkfs.ext3 ${2}" echo "mkfs.ext3 ${2}"
mkfs.ext3 ${2} mkfs.ext3 "${2}"
;; ;;
ext2) ext2)
echo "mkfs.ext2 ${2}" echo "mkfs.ext2 ${2}"
mkfs.ext2 ${2} mkfs.ext2 "${2}"
;; ;;
xfs) xfs)
fspkgs="${fspkgs[@]} xfsprogs" fspkgs="${fspkgs[@]} xfsprogs"
echo "mkfs.xfs -f ${2}" echo "mkfs.xfs -f ${2}"
mkfs.xfs -f ${2} mkfs.xfs -f "${2}"
;; ;;
f2fs) f2fs)
fspkgs="${fspkgs[@]} f2fs-tools" fspkgs="${fspkgs[@]} f2fs-tools"
echo "mkfs.f2fs $2" echo "mkfs.f2fs $2"
mkfs.f2fs $2 mkfs.f2fs "${2}"
;; ;;
jfs) jfs)
fspkgs="${fspkgs[@]} jfsutils" fspkgs="${fspkgs[@]} jfsutils"
echo "mkfs.xfs -f ${2}" echo "mkfs.xfs -f ${2}"
mkfs.jfs -f ${2} mkfs.jfs -f "${2}"
;; ;;
reiserfs) reiserfs)
fspkgs="${fspkgs[@]} reiserfsprogs" fspkgs="${fspkgs[@]} reiserfsprogs"
echo "mkfs.reiserfs -f ${2}" echo "mkfs.reiserfs -f ${2}"
mkfs.reiserfs -f ${2} mkfs.reiserfs -f "${2}"
;; ;;
luks) luks)
echo "${txtcreateluksdevice}" echo "${txtcreateluksdevice}"
echo "cryptsetup luksFormat ${2}" echo "cryptsetup luksFormat ${2}"
cryptsetup luksFormat ${2} cryptsetup luksFormat "${2}"
if [ ! "$?" = "0" ]; then if [ ! "$?" = "0" ]; then
pressanykey pressanykey
return 1 return 1
@ -647,7 +647,7 @@ formatdevice(){
echo "" echo ""
echo "${txtopenluksdevice}" echo "${txtopenluksdevice}"
echo "cryptsetup luksOpen ${2} ${1}" echo "cryptsetup luksOpen ${2} ${1}"
cryptsetup luksOpen ${2} ${1} cryptsetup luksOpen "${2}" "${1}"
if [ ! "$?" = "0" ]; then if [ ! "$?" = "0" ]; then
pressanykey pressanykey
return 1 return 1
@ -663,11 +663,11 @@ formatdevice(){
case ${sel} in case ${sel} in
normal) normal)
echo "dd if=/dev/zero of=/dev/mapper/${1}" echo "dd if=/dev/zero of=/dev/mapper/${1}"
dd if=/dev/zero of=/dev/mapper/${1} & PID=$! &>/dev/null dd if=/dev/zero of=/dev/mapper/"${1}" & PID=$! &>/dev/null
;; ;;
fast) fast)
echo "dd if=/dev/zero of=/dev/mapper/${1} bs=60M" echo "dd if=/dev/zero of=/dev/mapper/${1} bs=60M"
dd if=/dev/zero of=/dev/mapper/${1} bs=60M & PID=$! &>/dev/null dd if=/dev/zero of=/dev/mapper/"${1}" bs=60M & PID=$! &>/dev/null
;; ;;
esac esac
clear clear
@ -679,15 +679,15 @@ formatdevice(){
fi fi
echo "" echo ""
pressanykey pressanykey
formatdevice ${1} /dev/mapper/${1} noluks formatdevice "${1}" /dev/mapper/"${1}" noluks
if [ "${1}" = "root" ]; then if [ "${1}" = "root" ]; then
realrootdev=${rootdev} realrootdev=${rootdev}
rootdev=/dev/mapper/${1} rootdev=/dev/mapper/${1}
luksroot=1 luksroot=1
luksrootuuid=$(cryptsetup luksUUID ${2}) luksrootuuid=$(cryptsetup luksUUID "${2}")
else else
case ${1} in case ${1} in
home) homedev=/dev/mapper/${1} ;; home) homedev=/dev/mapper/"${1}" ;;
esac esac
luksdrive=1 luksdrive=1
crypttab="\n${1} UUID=$(cryptsetup luksUUID ${2}) none" crypttab="\n${1} UUID=$(cryptsetup luksUUID ${2}) none"
@ -703,20 +703,20 @@ formatdevice(){
mountparts(){ mountparts(){
clear clear
echo "mount ${rootdev} /mnt" echo "mount ${rootdev} /mnt"
mount ${rootdev} /mnt mount "${rootdev}" /mnt
echo "mkdir /mnt/{boot,home}" echo "mkdir /mnt/{boot,home}"
mkdir /mnt/{boot,home} 2>/dev/null mkdir /mnt/{boot,home} 2>/dev/null
if [ ! "${bootdev}" = "" ]; then if [ ! "${bootdev}" = "" ]; then
echo "mount ${bootdev} /mnt/boot" echo "mount ${bootdev} /mnt/boot"
mount ${bootdev} /mnt/boot mount "${bootdev}" /mnt/boot
fi fi
if [ ! "${swapdev}" = "" ]; then if [ ! "${swapdev}" = "" ]; then
echo "swapon ${swapdev}" echo "swapon ${swapdev}"
swapon ${swapdev} swapon "${swapdev}"
fi fi
if [ ! "${homedev}" = "" ]; then if [ ! "${homedev}" = "" ]; then
echo "mount ${homedev} /mnt/home" echo "mount ${homedev} /mnt/home"
mount ${homedev} /mnt/home mount "${homedev}" /mnt/home
fi fi
pressanykey pressanykey
installmenu installmenu
@ -876,7 +876,7 @@ installbase(){
clear clear
echo "pacstrap /mnt ${pkgs}" echo "pacstrap /mnt ${pkgs}"
pacstrap /mnt ${pkgs} pacstrap /mnt "${pkgs}"
pressanykey pressanykey
} }
@ -886,7 +886,7 @@ unmountdevices(){
umount -R /mnt umount -R /mnt
if [ ! "${swapdev}" = "" ]; then if [ ! "${swapdev}" = "" ]; then
echo "swapoff ${swapdev}" echo "swapoff ${swapdev}"
swapoff ${swapdev} swapoff "${swapdev}"
fi fi
pressanykey pressanykey
} }
@ -1034,9 +1034,9 @@ archmenu(){
archchroot(){ archchroot(){
echo "arch-chroot /mnt /root" echo "arch-chroot /mnt /root"
cp ${0} /mnt/root cp "${0}" /mnt/root
chmod 755 /mnt/root/$(basename "${0}") chmod 755 /mnt/root/$(basename "${0}")
arch-chroot /mnt /root/$(basename "${0}") --chroot ${1} ${2} arch-chroot /mnt /root/$(basename "${0}") --chroot "${1}" "${2}"
rm /mnt/root/$(basename "${0}") rm /mnt/root/$(basename "${0}")
echo "exit" echo "exit"
} }
@ -1143,7 +1143,7 @@ archsettime(){
fi fi
items=$(ls /mnt/usr/share/zoneinfo/${timezone}/) items=$(ls /mnt/usr/share/zoneinfo/"${timezone}"/)
options=() options=()
for item in ${items}; do for item in ${items}; do
options+=("${item}" "") options+=("${item}" "")
@ -1158,7 +1158,7 @@ archsettime(){
clear clear
echo "ln -sf /mnt/usr/share/zoneinfo/${timezone} /mnt/etc/localtime" echo "ln -sf /mnt/usr/share/zoneinfo/${timezone} /mnt/etc/localtime"
ln -sf /usr/share/zoneinfo/${timezone} /mnt/etc/localtime ln -sf /usr/share/zoneinfo/"${timezone}" /mnt/etc/localtime
pressanykey pressanykey
options=() options=()
@ -1411,15 +1411,15 @@ archgrubinstallbootloader(){
if [ "$?" = "0" ]; then if [ "$?" = "0" ]; then
clear clear
case ${sel} in case ${sel} in
"BIOS") archchroot grubbootloaderinstall ${device};; "BIOS") archchroot grubbootloaderinstall "${device}";;
"EFI") archchroot grubbootloaderefiinstall ${device};; "EFI") archchroot grubbootloaderefiinstall "${device}";;
"BIOS+EFI") archchroot grubbootloaderefiusbinstall ${device};; "BIOS+EFI") archchroot grubbootloaderefiusbinstall "${device}";;
esac esac
pressanykey pressanykey
fi fi
else else
clear clear
archchroot grubbootloaderinstall ${device} archchroot grubbootloaderinstall "${device}"
pressanykey pressanykey
fi fi
fi fi
@ -1427,14 +1427,14 @@ archgrubinstallbootloader(){
archgrubinstallbootloaderchroot(){ archgrubinstallbootloaderchroot(){
if [ ! "${1}" = "none" ]; then if [ ! "${1}" = "none" ]; then
echo "grub-install --target=i386-pc --recheck ${1}" echo "grub-install --target=i386-pc --recheck ${1}"
grub-install --target=i386-pc --recheck ${1} grub-install --target=i386-pc --recheck "${1}"
fi fi
exit exit
} }
archgrubinstallbootloaderefichroot(){ archgrubinstallbootloaderefichroot(){
if [ ! "${1}" = "none" ]; then if [ ! "${1}" = "none" ]; then
echo "grub-install --target=x86_64-efi --efi-directory=/boot --recheck ${1}" echo "grub-install --target=x86_64-efi --efi-directory=/boot --recheck ${1}"
grub-install --target=x86_64-efi --efi-directory=/boot --recheck ${1} grub-install --target=x86_64-efi --efi-directory=/boot --recheck "${1}"
isvbox=$(lspci | grep "VirtualBox G") isvbox=$(lspci | grep "VirtualBox G")
if [ "${isvbox}" ]; then if [ "${isvbox}" ]; then
echo "VirtualBox detected, creating startup.nsh..." echo "VirtualBox detected, creating startup.nsh..."
@ -1446,9 +1446,9 @@ archgrubinstallbootloaderefichroot(){
archgrubinstallbootloaderefiusbchroot(){ archgrubinstallbootloaderefiusbchroot(){
if [ ! "${1}" = "none" ]; then if [ ! "${1}" = "none" ]; then
echo "grub-install --target=i386-pc --recheck ${1}" echo "grub-install --target=i386-pc --recheck ${1}"
grub-install --target=i386-pc --recheck ${1} grub-install --target=i386-pc --recheck "${1}"
echo "grub-install --target=x86_64-efi --efi-directory=/boot --removable --recheck ${1}" echo "grub-install --target=x86_64-efi --efi-directory=/boot --removable --recheck ${1}"
grub-install --target=x86_64-efi --efi-directory=/boot --removable --recheck ${1} grub-install --target=x86_64-efi --efi-directory=/boot --removable --recheck "${1}"
isvbox=$(lspci | grep "VirtualBox G") isvbox=$(lspci | grep "VirtualBox G")
if [ "${isvbox}" ]; then if [ "${isvbox}" ]; then
echo "VirtualBox detected, creating startup.nsh..." echo "VirtualBox detected, creating startup.nsh..."
@ -1536,9 +1536,9 @@ archsyslinuxinstall(){
archsyslinuxinstallbootloader(){ archsyslinuxinstallbootloader(){
clear clear
if [ "${efimode}" == "1" ]||[ "${efimode}" == "2" ]; then if [ "${efimode}" == "1" ]||[ "${efimode}" == "2" ]; then
archchroot syslinuxbootloaderefiinstall ${bootdev} archchroot syslinuxbootloaderefiinstall "${bootdev}"
else else
archchroot syslinuxbootloaderinstall ${bootdev} archchroot syslinuxbootloaderinstall "${bootdev}"
fi fi
pressanykey pressanykey
} }
@ -1606,8 +1606,8 @@ archrefindinstall(){
echo "echo \"\\\"Hyperbola GNU+Linux-libre Fallback\\\" \\\"root=UUID=${rootuuid} rw add_efi_memmap initrd=/initramfs-linux-fallback.img\\\"\" >> /mnt/boot/refind_linux.conf" echo "echo \"\\\"Hyperbola GNU+Linux-libre Fallback\\\" \\\"root=UUID=${rootuuid} rw add_efi_memmap initrd=/initramfs-linux-fallback.img\\\"\" >> /mnt/boot/refind_linux.conf"
pacstrap /mnt refind-efi pacstrap /mnt refind-efi
archchroot refindbootloaderinstall ${realrootdev} archchroot refindbootloaderinstall "${realrootdev}"
rootuuid=$(blkid -s UUID -o value ${realrootdev}) rootuuid=$(blkid -s UUID -o value "${realrootdev}")
echo "\"Hyperbola GNU+Linux-libre \" \"root=UUID=${rootuuid} rw add_efi_memmap\"" > /mnt/boot/refind_linux.conf echo "\"Hyperbola GNU+Linux-libre \" \"root=UUID=${rootuuid} rw add_efi_memmap\"" > /mnt/boot/refind_linux.conf
echo "\"Hyperbola GNU+Linux-libre Fallback\" \"root=UUID=${rootuuid} rw add_efi_memmap initrd=/initramfs-linux-fallback.img\"" >> /mnt/boot/refind_linux.conf echo "\"Hyperbola GNU+Linux-libre Fallback\" \"root=UUID=${rootuuid} rw add_efi_memmap initrd=/initramfs-linux-fallback.img\"" >> /mnt/boot/refind_linux.conf
pressanykey pressanykey
@ -1645,7 +1645,7 @@ archextrasmenu(){
done done
clear clear
echo "pacstrap /mnt ${pkgs}" echo "pacstrap /mnt ${pkgs}"
pacstrap /mnt ${pkgs} pacstrap /mnt "${pkgs}"
if [[ "${pkgs}" == *"dhcpcd"* ]]; then if [[ "${pkgs}" == *"dhcpcd"* ]]; then
archchroot enabledhcpcd archchroot enabledhcpcd
fi fi
@ -1868,8 +1868,8 @@ while (( "$#" )); do
;; ;;
-sf | --skip-font) skipfont=1;; -sf | --skip-font) skipfont=1;;
-t | --test) -t | --test)
wget -O hyperfi https://hgit.ga/${2}/hyperfi/raw/branch/${3}/hyperfi wget -O hyperfi "https://hgit.ga/${2}/hyperfi/raw/branch/${3}/hyperfi"
sh hyperfi -tt ${2} ${3} sh hyperfi -tt "${2}" "${3}"
exit 0 exit 0
;; ;;
-tt) baseurl="https://hgit.ga/${2}/hyperfi/raw/branch/${3}";; -tt) baseurl="https://hgit.ga/${2}/hyperfi/raw/branch/${3}";;
@ -1902,12 +1902,12 @@ if [ "${chroot}" = "1" ]; then
'genmkinitcpio') archgenmkinitcpiochroot;; 'genmkinitcpio') archgenmkinitcpiochroot;;
'enabledhcpcd') archenabledhcpcdchroot;; 'enabledhcpcd') archenabledhcpcdchroot;;
'grubinstall') archgrubinstallchroot;; 'grubinstall') archgrubinstallchroot;;
'grubbootloaderinstall') archgrubinstallbootloaderchroot ${args};; 'grubbootloaderinstall') archgrubinstallbootloaderchroot "${args}";;
'grubbootloaderefiinstall') archgrubinstallbootloaderefichroot ${args};; 'grubbootloaderefiinstall') archgrubinstallbootloaderefichroot "${args}";;
'grubbootloaderefiusbinstall') archgrubinstallbootloaderefiusbchroot ${args};; 'grubbootloaderefiusbinstall') archgrubinstallbootloaderefiusbchroot "${args}";;
'syslinuxbootloaderinstall') archsyslinuxinstallbootloaderchroot ${args};; 'syslinuxbootloaderinstall') archsyslinuxinstallbootloaderchroot "${args}";;
'syslinuxbootloaderefiinstall') archsyslinuxinstallbootloaderefichroot ${args};; 'syslinuxbootloaderefiinstall') archsyslinuxinstallbootloaderefichroot "${args}";;
'refindbootloaderinstall') archrefindinstallchroot ${args};; 'refindbootloaderinstall') archrefindinstallchroot "${args}";;
'hyperdiinstallandlaunch') hyperdiinstallandlaunchchroot;; 'hyperdiinstallandlaunch') hyperdiinstallandlaunchchroot;;
'hyperdiinstall') hyperdiinstallchroot;; 'hyperdiinstall') hyperdiinstallchroot;;
'hyperdilaunch') hyperdilaunchchroot;; 'hyperdilaunch') hyperdilaunchchroot;;