HenrikBengtsson / x86-64-level

x86-64-level - Get the x86-64 Microarchitecture Level on the Current Machine
https://github.com/HenrikBengtsson/x86-64-level
95 stars 16 forks source link

Convert to POSIX shell script (away from Bash) #15

Open HenrikBengtsson opened 6 months ago

HenrikBengtsson commented 6 months ago

Adding this here so it's not forgotten; @stefanct wrote in PR #14

I think scripts that are supposed as aids in compatibility checks should be most compatible themselves. Therefore I've spent some time on getting rid all the bashism in the main script. Performance is certainly impacted (and most probably slightly negatively) but I've tried to keep everything backward-compatible including the argument checks. All tests keep passing throughout the patch series.