From 4ee99d21f524ec392b4fdd1ee4c4c3177a7ef2b4 Mon Sep 17 00:00:00 2001 From: HikariKnight <2557889+HikariKnight@users.noreply.github.com> Date: Thu, 10 Mar 2022 16:22:45 +0100 Subject: [PATCH] appease the shellcheck --- lib/get_USB_CTL_GROUP.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/get_USB_CTL_GROUP.sh b/lib/get_USB_CTL_GROUP.sh index 311c044..6dcfedb 100755 --- a/lib/get_USB_CTL_GROUP.sh +++ b/lib/get_USB_CTL_GROUP.sh @@ -25,7 +25,8 @@ To return to the previous page just press ENTER. case "${YESNO}" in [Yy]*) # Get the PCI ids - local 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$//") + 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$//") # 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"