shellcheck step 2

This commit is contained in:
Jesús 2022-05-24 09:14:09 +08:00
parent fa32f061a5
commit 71861d4021
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766

30
hyperfi
View File

@ -349,7 +349,7 @@ diskpartautoefiusb(){
echo "${txtautopartcreate//%1/root}"
sgdisk "${device}" -n=4:0:0
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 ""
pressanykey
if [ "${device::8}" == "/dev/nvm" ]; then
@ -690,7 +690,7 @@ formatdevice(){
home) homedev=/dev/mapper/"${1}" ;;
esac
luksdrive=1
crypttab="\n${1} UUID=$(cryptsetup luksUUID ${2}) none"
crypttab="\n${1} UUID=$(cryptsetup luksUUID "${2}") none"
fi
echo ""
echo "${txtluksdevicecreated}"
@ -1035,9 +1035,9 @@ archmenu(){
archchroot(){
echo "arch-chroot /mnt /root"
cp "${0}" /mnt/root
chmod 755 /mnt/root/$(basename "${0}")
arch-chroot /mnt /root/$(basename "${0}") --chroot "${1}" "${2}"
rm /mnt/root/$(basename "${0}")
chmod 755 /mnt/root/"$(basename "${0}")"
arch-chroot /mnt /root/"$(basename "${0}")" --chroot "${1}" "${2}"
rm /mnt/root/"$(basename "${0}")"
echo "exit"
}
@ -1499,26 +1499,26 @@ archsyslinuxinstall(){
fi
if [ "${isnvme}" = "1" ]; then
if [ "$(parted ${realrootdev::(-2)} print|grep gpt)" != "" ]; then
if [ "$(parted "${realrootdev::(-2)}" print|grep gpt)" != "" ]; then
echo "${txtsyslinuxaddgptfdisk}"
additionalpkg=${additionalpkg}"gptfdisk "
fi
else
if [ "$(parted ${realrootdev::8} print|grep gpt)" != "" ]; then
if [ "$(parted "${realrootdev::8}" print|grep gpt)" != "" ]; then
echo "${txtsyslinuxaddgptfdisk}"
additionalpkg=${additionalpkg}"gptfdisk "
fi
fi
if [ "${bootdev}" != "" ]; then
if [ "$(parted ${bootdev} print|grep fat)" != "" ]; then
if [ "$(parted "${bootdev}" print|grep fat)" != "" ]; then
echo "${txtsyslinuxaddmtools}"
additionalpkg=${additionalpkg}"mtools "
fi
fi
echo "pacstrap /mnt syslinux ${additionalpkg}"
pacstrap /mnt syslinux ${additionalpkg}
pacstrap /mnt syslinux "${additionalpkg}"
pressanykey
clear
@ -1554,11 +1554,11 @@ archsyslinuxinstallbootloaderefichroot(){
echo "cp -r /usr/lib/syslinux/efi64/* /boot/syslinux"
cp -r /usr/lib/syslinux/efi64/* /boot/syslinux
if [ "${1::8}" == "/dev/nvm" ]; then
echo "efibootmgr --create --disk ${1::(-2)} --part ${1:(-1)} --loader /syslinux/syslinux.efi --label "Syslinux" --verbose"
efibootmgr --create --disk ${1::(-2)} --part ${1:(-1)} --loader /syslinux/syslinux.efi --label "Syslinux" --verbose
echo "efibootmgr --create --disk ${1::(-2)} --part ${1:(-1)} --loader /syslinux/syslinux.efi --label \"Syslinux\" --verbose"
efibootmgr --create --disk "${1::(-2)}" --part "${1:(-1)}" --loader /syslinux/syslinux.efi --label "Syslinux" --verbose
else
echo "efibootmgr --create --disk ${1::8} --part ${1:(-1)} --loader /syslinux/syslinux.efi --label "Syslinux" --verbose"
efibootmgr --create --disk ${1::8} --part ${1:(-1)} --loader /syslinux/syslinux.efi --label "Syslinux" --verbose
echo "efibootmgr --create --disk ${1::8} --part ${1:(-1)} --loader /syslinux/syslinux.efi --label \"Syslinux\" --verbose"
efibootmgr --create --disk "${1::8}" --part "${1:(-1)}" --loader /syslinux/syslinux.efi --label "Syslinux" --verbose
fi
isvbox=$(lspci | grep "VirtualBox G")
if [ "${isvbox}" ]; then
@ -1705,7 +1705,7 @@ hyperdidownload(){
esac
fi
echo "curl -L ${hyperdiurl} >hyperdi"
curl -L ${hyperdiurl} >hyperdi
curl -L "${hyperdiurl}" > hyperdi
}
hyperdiinstallandlaunchchroot(){
cd
@ -1859,7 +1859,7 @@ while (( "$#" )); do
exit 0
;;
-cpl | --custom-package-list)
curl -L ${2} > /tmp/hyperfi-custom-package-list
curl -L "${2}" > /tmp/hyperfi-custom-package-list
if [[ "$?" != "0" ]]; then
echo "Error downloading custom package list"
exit 0