use global readonly vars for common paths/basedirs

This commit is contained in:
Stéphane Lesimple
2026-03-30 19:31:22 +02:00
parent 5a3362a7ed
commit a74111bfcd
2 changed files with 64 additions and 57 deletions

View File

@@ -54,7 +54,7 @@ The entire tool is a single bash script with no external script dependencies. Ke
This script uses the following naming rules for variables:
`UPPER_SNAKE_CASE` : Constants and enums (e.g. READ_MSR_RET_OK, EAX), declared as `readonly`.
`UPPER_SNAKE_CASE` : Constants and enums (e.g. READ_MSR_RET_OK, EAX), declared with `readonly` on the assignment line (e.g. `readonly FOO="bar"`).
When they're used as values affected to "Out-parameters" of a function, they should follow the `<FUNC>_RET_*` pattern.
Such variables should be declared right above the definition of the function they're dedicated to.
Other general constants go at the top of the file, below the `VERSION` affectation.