Make shellcheck happier
This commit is contained in:
parent
4fc07b97f2
commit
901096604c
10 changed files with 20 additions and 19 deletions
|
@ -74,7 +74,8 @@ to build your new initrd image (all of this will require sudo permissions!)"
|
|||
|
||||
|
||||
function main () {
|
||||
SCRIPTDIR=$(dirname "$(realpath $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||
SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||
|
||||
apply_CHANGES
|
||||
}
|
||||
|
||||
|
|
|
@ -15,14 +15,14 @@ does not belong to itself. Both cards must also have unique hardware ids [xxxx:y
|
|||
Press q to quit
|
||||
"
|
||||
|
||||
read -p "Which group number do you want to check?: " IOMMU_GROUP
|
||||
read -r -p "Which group number do you want to check?: " IOMMU_GROUP
|
||||
|
||||
case "${IOMMU_GROUP}" in
|
||||
[1-9]*)
|
||||
exec "$SCRIPTDIR/lib/get_GPU_GROUP.sh" $IOMMU_GROUP
|
||||
exec "$SCRIPTDIR/lib/get_GPU_GROUP.sh" "$IOMMU_GROUP"
|
||||
;;
|
||||
[Qq]*)
|
||||
printf "Aborted, your setup is incomplete!
|
||||
echo "Aborted, your setup is incomplete!
|
||||
DO NOT use any of the files from $SCRIPTDIR/config !
|
||||
"
|
||||
;;
|
||||
|
@ -33,7 +33,7 @@ DO NOT use any of the files from $SCRIPTDIR/config !
|
|||
}
|
||||
|
||||
function main () {
|
||||
SCRIPTDIR=$(dirname "$(realpath $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||
SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||
|
||||
get_GPU
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
function get_GROUP () {
|
||||
function get_GPU_GROUP () {
|
||||
clear
|
||||
# Get the config paths
|
||||
source "$SCRIPTDIR/lib/paths.sh"
|
||||
|
@ -58,9 +58,9 @@ USB_CTL_ID=()
|
|||
}
|
||||
|
||||
function main () {
|
||||
SCRIPTDIR=$(dirname "$(realpath $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||
SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||
|
||||
get_GROUP "$1"
|
||||
get_GPU_GROUP "$1"
|
||||
}
|
||||
|
||||
main "$1"
|
||||
|
|
|
@ -61,7 +61,7 @@ echo 0 | sudo tee $VBIOS_PATH
|
|||
|
||||
|
||||
function main () {
|
||||
SCRIPTDIR=$(dirname "$(realpath $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||
SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||
|
||||
get_GPU_ROM "$1"
|
||||
}
|
||||
|
|
|
@ -15,11 +15,11 @@ is only needed if you intend to use other devices than just mouse and keyboard w
|
|||
Press q to quit
|
||||
"
|
||||
|
||||
read -p "Which group number do you want to check?: " IOMMU_GROUP
|
||||
read -r -p "Which group number do you want to check?: " IOMMU_GROUP
|
||||
|
||||
case "${IOMMU_GROUP}" in
|
||||
[1-9]*)
|
||||
exec "$SCRIPTDIR/lib/get_USB_CTL_GROUP.sh" $IOMMU_GROUP
|
||||
exec "$SCRIPTDIR/lib/get_USB_CTL_GROUP.sh" "$IOMMU_GROUP"
|
||||
;;
|
||||
[Qq]*)
|
||||
exec "$SCRIPTDIR/lib/apply_CHANGES.sh"
|
||||
|
@ -31,7 +31,7 @@ Press q to quit
|
|||
}
|
||||
|
||||
function main () {
|
||||
SCRIPTDIR=$(dirname "$(realpath $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||
SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||
|
||||
get_USB_CTL
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ To use any of the devices shown for passthrough, all of them have to be passed t
|
|||
|
||||
To return to the previous page just press ENTER.
|
||||
"
|
||||
read -p "Do you want to use the displayed devices for passthrough? [y/N]: " YESNO
|
||||
read -r -p "Do you want to use the displayed devices for passthrough? [y/N]: " YESNO
|
||||
|
||||
case "${YESNO}" in
|
||||
[Yy]*)
|
||||
|
@ -39,7 +39,7 @@ To return to the previous page just press ENTER.
|
|||
}
|
||||
|
||||
function main () {
|
||||
SCRIPTDIR=$(dirname "$(realpath $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||
SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||
|
||||
get_USB_CTL_GROUP $1
|
||||
}
|
||||
|
|
|
@ -170,7 +170,7 @@ function set_CMDLINE () {
|
|||
|
||||
|
||||
function main () {
|
||||
SCRIPTDIR=$(dirname "$(realpath $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||
SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||
|
||||
set_CMDLINE
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ function set_INITRAMFSTOOLS () {
|
|||
|
||||
|
||||
function main () {
|
||||
SCRIPTDIR=$(dirname "$(realpath $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||
SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||
|
||||
set_INITRAMFSTOOLS "$1"
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ softdep radeon pre: vfio vfio_pci
|
|||
}
|
||||
|
||||
function main () {
|
||||
SCRIPTDIR=$(dirname "$(realpath $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||
SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||
|
||||
set_MODPROBE "$1"
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ function set_VFIO () {
|
|||
echo "
|
||||
Disabling video output in Linux for the card you want to use in a VM
|
||||
will make it easier to successfully do the passthrough without issues."
|
||||
read -p "Do you want to force disable video output in linux on this card? [Y/n]: " DISABLE_VGA
|
||||
read -r -p "Do you want to force disable video output in linux on this card? [Y/n]: " DISABLE_VGA
|
||||
case "${DISABLE_VGA}" in
|
||||
[Yy]*)
|
||||
# Update kernel_args file
|
||||
|
@ -37,7 +37,7 @@ will make it easier to successfully do the passthrough without issues."
|
|||
}
|
||||
|
||||
function main () {
|
||||
SCRIPTDIR=$(dirname "$(realpath $0)" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||
SCRIPTDIR=$(dirname "$(realpath "$0")" | perl -pe "s/\/\.\.\/lib//" | perl -pe "s/\/lib$//")
|
||||
|
||||
set_VFIO "$1"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue