big shellcheck cleanup and disabling the shellchecks we will ignore

This commit is contained in:
HikariKnight 2022-03-13 12:53:13 +01:00
parent f90e35f647
commit 6e0fd90dd7
No known key found for this signature in database
GPG key ID: E8B239063B022F5A
13 changed files with 31 additions and 14 deletions

View file

@ -1,4 +1,5 @@
#!/bin/bash
# shellcheck disable=SC1091
function get_USB_CTL_GROUP () {
clear
@ -26,7 +27,7 @@ To return to the previous page just press ENTER.
[Yy]*)
# Get the PCI ids
local PCI_ID
PCI_ID=$($SCRIPTDIR/utils/ls-iommu | grep -i "group $1" | cut -d " " -f 4 | perl -pe "s/([0-9a-f]{2}:[0-9a-f]{2}.[0-9a-f]{1})\n/\"\1\" /" | perl -pe "s/\s$//")
PCI_ID=$("$SCRIPTDIR/utils/ls-iommu" | grep -i "group $1" | cut -d " " -f 4 | perl -pe "s/([0-9a-f]{2}:[0-9a-f]{2}.[0-9a-f]{1})\n/\"\1\" /" | perl -pe "s/\s$//")
# Replace the blank USB_CTL_ID with the PCI_ID for the usb controller the user wants to pass through
perl -pi -e "s/USB_CTL_ID=\(\)/USB_CTL_ID=\($PCI_ID\)/" "$SCRIPTDIR/$QUICKEMU/qemu-vfio_vars.conf"