mirror of
				https://github.com/speed47/spectre-meltdown-checker.git
				synced 2025-11-03 23:30:52 +01:00 
			
		
		
		
	feat: add optional git describe support to display inter-release version numbers
This commit is contained in:
		@@ -26,6 +26,12 @@ exit_cleanup()
 | 
				
			|||||||
	[ "$kldload_cpuctl"  = 1 ] && kldunload cpuctl 2>/dev/null
 | 
						[ "$kldload_cpuctl"  = 1 ] && kldunload cpuctl 2>/dev/null
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# if we were git clone'd, adjust VERSION
 | 
				
			||||||
 | 
					if [ -d "$(dirname "$0")/.git" ] && which git >/dev/null 2>&1; then
 | 
				
			||||||
 | 
						describe=$(git -C "$(dirname "$0")" describe --tags --dirty 2>/dev/null)
 | 
				
			||||||
 | 
						[ -n "$describe" ] && VERSION=$(echo "$describe" | sed -e s/^v//)
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
show_usage()
 | 
					show_usage()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	# shellcheck disable=SC2086
 | 
						# shellcheck disable=SC2086
 | 
				
			||||||
@@ -1274,7 +1280,7 @@ is_latest_known_ucode()
 | 
				
			|||||||
	ucode_latest="latest microcode version of your CPU is not known to this script"
 | 
						ucode_latest="latest microcode version of your CPU is not known to this script"
 | 
				
			||||||
	is_intel || return 2
 | 
						is_intel || return 2
 | 
				
			||||||
	# https://www.intel.com/content/dam/www/public/us/en/documents/sa00115-microcode-update-guidance.pdf
 | 
						# https://www.intel.com/content/dam/www/public/us/en/documents/sa00115-microcode-update-guidance.pdf
 | 
				
			||||||
	# ps2txt sa00115-microcode-update-guidance.ps | grep -Eo '[0-9A-F]+ [0-9A-F]+ [^ ]+ Production 0x[A-F0-9]+ 0x[A-F0-9]+' | awk '{print "0x"$1","$6" \\"}' | uniq
 | 
						# ps2txt sa00115-microcode-update-guidance.ps | grep -Eo '[0-9A-F]+ [0-9A-F]+ [^ ]+ Production 0x[A-F0-9]+ 0x[^ ]+' | awk '{print "0x"$1","$6" \\"}' | uniq
 | 
				
			||||||
	# cpuid,ucode
 | 
						# cpuid,ucode
 | 
				
			||||||
	for tuple in \
 | 
						for tuple in \
 | 
				
			||||||
		0x106A5,0x1D \
 | 
							0x106A5,0x1D \
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user