File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -44,11 +44,12 @@ jobs:
4444 name : " Release v${{ env.VERSION }}"
4545 update : true
4646 body : |
47+
4748 <!--
4849 PECU-Channel : Stable
4950 PECU-Title : EDIT TITLE HERE
5051 PECU-Desc : EDIT SHORT DESCRIPTION HERE
51- -->
52+ -->
5253
5354 # ## What's New in This Update
5455
Original file line number Diff line number Diff line change @@ -401,11 +401,24 @@ read_gpu_id() {
401401 3>&1 1>&2 2>&3 ) || return 1
402402
403403 # Validate PCI syntax: domain:bus.device.function
404- if ! [[ " $GPU_ID " =~ ^[0-9A-Fa-f]{4}:[0-9A-Fa-f]{2}\. [0-9A-Fa-f]$ ]]; then
404+ if ! [[ " $GPU_ID " =~ ^( [0-9A-Fa-f]{4}:) ? [0-9A-Fa-f]{2 }:[0-9A-Fa-f]{2}\. [0-9A-Fa-f]$ ]]; then
405405 whiptail --title " Error" --msgbox " Invalid PCI ID format: $GPU_ID " 8 60
406406 return 1
407407 fi
408408
409+ # If the user omitted the domain, prepend the default 0000:
410+ [[ " $GPU_ID " =~ ^[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}\. [0-9A-Fa-f]$ ]] && GPU_ID=" 0000:$GPU_ID "
411+
412+ # ── Lookup vendor/device; show error only if ID truly does not exist ──
413+ GPU_VENDOR_ID=$( lspci -n -s " $GPU_ID " | awk ' {print $3}' )
414+ if [[ -z " $GPU_VENDOR_ID " ]]; then
415+ whiptail --title " Error" --msgbox " PCI ID not found: $GPU_ID " 8 60
416+ return 1
417+ fi
418+
419+ whiptail --title " Vendor/Device" \
420+ --msgbox " Vendor/Device ID: $GPU_VENDOR_ID " 8 60
421+
409422 # Lookup vendor/device code; abort if lookup fails.
410423 GPU_VENDOR_ID=$( lspci -n -s " $GPU_ID " | awk ' {print $3}' ) || {
411424 whiptail --title " Error" --msgbox " PCI ID not found: $GPU_ID " 8 60
You can’t perform that action at this time.
0 commit comments