Namespace src/Profiles
src/Profiles
Overview
Directory src/Profiles
file source src/Profiles/allDepsRecursive.sh
Profiles::allDepsRecursive
get recursively all the dependencies of each config from configs arg
The parent argument must be set to “your software selection” when you call it, then the value will change when this function will be called recursively with the parent dependency
Algorithm For each config in configs - load config definition - mark this config as seen to avoid to recompute it later, in the case where another definition depends on it - call installScripts_${config}_dependencies function if exists (skipped if not) - add these new dependencies if any to current dependencies list - call recursively Profiles::allDepsRecursive with these dependencies - add in allDepsResult the current config if it was not seen yet This has constructed a tree with the most deep dependency present in the first items
Arguments
- $1 (scriptsDir:String): base directory where dependencies can be retrieved
- $2 (parent:String): set to “your software selection” when you call it
- … (configs:String[]): list of configurations to load, each config can depend on an other one
Variables set
- allDepsResultSeen (String[]): list of dependencies already seen
- allDepsResult (String[]): the final list of dependencies sorted by the most to less dependent
Exit codes
- 1: if one of the dependency cannot be found
- 2: if error while loading one of the dependency definition
- 3: if error while calling dependencies function of the dependency’s definition
Output on stderr
- diagnostics information is displayed
Warnings
- allDepsResultSeen and allDepsResult global variables have to reset to empty array every time you call this function
src/Profiles/checkScriptsExistence.sh
file source src/Profiles/checkScriptsExistence.sh
Profiles::checkScriptsExistence
check if dependencies exist path is constructed with following rule ${scriptsDir}/${dependency}${extension}
Arguments
- $1 scriptsDir:String
- $2 extension:String
- … (args:String[]): list of dependencies to check
Exit codes
- 1: if one the script does not exist
Output on stderr
- diagnostics information is displayed
src/Profiles/lintDefinitions.sh
file source src/Profiles/lintDefinitions.sh
Profiles::lintDefinitions
linter that allows to check if a list of methods is defined in each sh file of given scriptsDir
Arguments
- $1 (scriptsDir:String): the directory to check
- $2 (format:String): can be plain or checkstyle
- $@ args:String[]
Exit codes
- 1: if errorCount > 0
Output on stderr
- diagnostics information is displayed