<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Namespace on Bash Tools Framework Documentation</title><link>https://bash-tools-framework.devlab.top/bashdoc/</link><description>Recent content in Namespace on Bash Tools Framework Documentation</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 12 Jun 2026 14:26:41 +0000</lastBuildDate><atom:link href="https://bash-tools-framework.devlab.top/bashdoc/index.xml" rel="self" type="application/rss+xml"/><item><title>Namespace src/Args</title><link>https://bash-tools-framework.devlab.top/bashdoc/args/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/args/</guid><description>&lt;h2 id="srcargs"&gt;src/Args&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Args&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Args/defaultHelp.sh"&gt;file source src/Args/defaultHelp.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="argsdefaulthelp"&gt;Args::defaultHelp&lt;/h4&gt;
&lt;p&gt;display help and exits if one of args is -h|&amp;ndash;help&lt;/p&gt;
&lt;h5 id="options"&gt;Options&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;-h&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;short help option&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&amp;ndash;help&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;long help option&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$1&lt;/strong&gt; (helpArg:String|Function): the help string to display or the function to call to display the help&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&amp;hellip;&lt;/strong&gt; (args:String[]): list of options&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;0&lt;/strong&gt;: displays help and exit with code 0 if -h or &amp;ndash;help option is in the args list&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="output-on-stdout"&gt;Output on stdout&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;displays help if -h or &amp;ndash;help option is in the args list&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcargsdefaulthelpnoexitsh"&gt;src/Args/defaultHelpNoExit.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Args/defaultHelpNoExit.sh"&gt;file source src/Args/defaultHelpNoExit.sh&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Namespace src/Array</title><link>https://bash-tools-framework.devlab.top/bashdoc/array/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/array/</guid><description>&lt;h2 id="srcarray"&gt;src/Array&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Array&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Array/clone.sh"&gt;file source src/Array/clone.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="arrayclone"&gt;Array::clone&lt;/h4&gt;
&lt;p&gt;clone the array passed as parameter&lt;/p&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$1&lt;/strong&gt; (arrayToClone:String): name of the array to clone&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$2&lt;/strong&gt; (clonedArray:String): name of the cloned array&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="variables-set"&gt;Variables set&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;clonedArray&lt;/strong&gt; (containing): the values of arrayToClone&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcarraycontainssh"&gt;src/Array/contains.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Array/contains.sh"&gt;file source src/Array/contains.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="arraycontains"&gt;Array::contains&lt;/h4&gt;
&lt;p&gt;check if an element is contained in an array&lt;/p&gt;
&lt;h5 id="example"&gt;Example&lt;/h5&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Array::contains &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;libPath&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;__BASH_FRAMEWORK_IMPORTED_FILES&lt;/span&gt;&lt;span class="p"&gt;[@]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h5 id="arguments-1"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;$1 needle:String&lt;/li&gt;
&lt;li&gt;$@ array:String[]&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;0&lt;/strong&gt;: if found&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt;: otherwise&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcarrayjoinsh"&gt;src/Array/join.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Array/join.sh"&gt;file source src/Array/join.sh&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Namespace src/Assert</title><link>https://bash-tools-framework.devlab.top/bashdoc/assert/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/assert/</guid><description>&lt;h2 id="srcassert"&gt;src/Assert&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Assert&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Assert/bashFile.sh"&gt;file source src/Assert/bashFile.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="assertbashfile"&gt;Assert::bashFile&lt;/h4&gt;
&lt;p&gt;ensure that file begin with a bash shebang&lt;/p&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;$1 file:String&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt;: if file doesn&amp;rsquo;t have a bash shebang&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2&lt;/strong&gt;: if file doesn&amp;rsquo;t exist&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcassertbashframeworkfunctionsh"&gt;src/Assert/bashFrameworkFunction.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Assert/bashFrameworkFunction.sh"&gt;file source src/Assert/bashFrameworkFunction.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="assertbashframeworkfunction"&gt;Assert::bashFrameworkFunction&lt;/h4&gt;
&lt;p&gt;assert that first arg respects this bash framework naming convention&lt;/p&gt;
&lt;h5 id="arguments-1"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$1&lt;/strong&gt; (bashFrameworkFunction:String): the function&amp;rsquo;s name to assert&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes-1"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt;: if bashFrameworkFunction arg doesn&amp;rsquo;t respect this bash framework naming convention&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcassertcommandexistssh"&gt;src/Assert/commandExists.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Assert/commandExists.sh"&gt;file source src/Assert/commandExists.sh&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Namespace src/Aws</title><link>https://bash-tools-framework.devlab.top/bashdoc/aws/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/aws/</guid><description>&lt;h2 id="srcaws"&gt;src/Aws&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Aws&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Aws/imageExists.sh"&gt;file source src/Aws/imageExists.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="awsimageexists"&gt;Aws::imageExists&lt;/h4&gt;
&lt;p&gt;Checks if image exists with tags provided on AWS ecr
best practice: provide tags &amp;rsquo;tagPrefix_shortSha&amp;rsquo; &amp;rsquo;tagPrefix_branchName'
so image will be tagged with&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;tagPrefix_shortSha&lt;/li&gt;
&lt;li&gt;tagPrefix_branchName&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$1&lt;/strong&gt; (repositoryName:String): eg:889859566884.dkr.ecr.eu-west-1.amazonaws.com/bast-tools-dev-env&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&amp;hellip;&lt;/strong&gt; (tags:String[]): list of tags used to check if image exists on AWS ECR&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt;: if no tag provided&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2&lt;/strong&gt;: if at least one tag does not exist&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="output-on-stderr"&gt;Output on stderr&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;diagnostics information is displayed&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="requires"&gt;Requires&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Aws::requireAwsCommand&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcawsrequireawscommandsh"&gt;src/Aws/requireAwsCommand.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Aws/requireAwsCommand.sh"&gt;file source src/Aws/requireAwsCommand.sh&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Namespace src/Backup</title><link>https://bash-tools-framework.devlab.top/bashdoc/backup/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/backup/</guid><description>&lt;h2 id="srcbackup"&gt;src/Backup&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Backup&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Backup/dir.sh"&gt;file source src/Backup/dir.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="backupdir"&gt;Backup::dir&lt;/h4&gt;
&lt;p&gt;Backup given directory in the base directory or in BACKUP_DIR directory
backup directory name is composed by following fields separated by _:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;if BACKUP_DIR is not empty then escaped full dir name separated by @&lt;/li&gt;
&lt;li&gt;date with format %Y%m%d_%H:%M:%S (Eg: 20240326_14:45:08)&lt;/li&gt;
&lt;li&gt;.tgz extension&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$1&lt;/strong&gt; (string): the base directory&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$2&lt;/strong&gt; (string): the directory to backup from base directory&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="environment-variables"&gt;Environment variables&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;BACKUP_DIR&lt;/strong&gt; (String): variable referencing backup directory&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;FRAMEWORK_ROOT_DIR&lt;/strong&gt; (String): used to remove this project directory from displayed backup path&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SUDO&lt;/strong&gt; (String): allows to use custom sudo prefix command&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt;: if directory to backup does not exist, 0 if everything is OK&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2&lt;/strong&gt;: on backup failure&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="output-on-stderr"&gt;Output on stderr&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;message about where the directory is backed up&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="requires"&gt;Requires&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Linux::requireTarCommand&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcbackupfilesh"&gt;src/Backup/file.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Backup/file.sh"&gt;file source src/Backup/file.sh&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Namespace src/Bash</title><link>https://bash-tools-framework.devlab.top/bashdoc/bash/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/bash/</guid><description>&lt;h2 id="srcbash"&gt;src/Bash&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Bash&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Bash/handlePipelineFailure.sh"&gt;file source src/Bash/handlePipelineFailure.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="bashhandlepipelinefailure"&gt;Bash::handlePipelineFailure&lt;/h4&gt;
&lt;p&gt;ignore exit code 141 from simple command pipes&lt;/p&gt;
&lt;h5 id="example"&gt;Example&lt;/h5&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; local resultingStatus=0
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; local -a originalPipeStatus=()
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; cmd1 | cmd2 || Bash::handlePipelineFailure resultingStatus originalPipeStatus || true
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; [[ &amp;#34;${resultingStatus}&amp;#34; = &amp;#34;0&amp;#34; ]]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;@arg $1 resultingStatusCode:&amp;amp;int (passed by reference) (optional) resulting status code
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;@arg $2 originalStatus:int[] (passed by reference) (optional) copy of original PIPESTATUS array
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;@env PIPESTATUS assuming that this function is called like in the example provided
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;@see https://unix.stackexchange.com/a/709880/582856
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;@see https://gitlab.alpinelinux.org/alpine/aports/-/issues/11152
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;@warning alpine does not support PIPESTATUS very well as execution order of piped process is
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;not guaranteed
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Namespace src/Bats</title><link>https://bash-tools-framework.devlab.top/bashdoc/bats/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/bats/</guid><description>&lt;h2 id="srcbats"&gt;src/Bats&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Bats&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Bats/installRequirementsIfNeeded.sh"&gt;file source src/Bats/installRequirementsIfNeeded.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="batsinstallrequirementsifneeded"&gt;Bats::installRequirementsIfNeeded&lt;/h4&gt;
&lt;p&gt;&lt;a href="#"&gt;&lt;img src="https://img.shields.io/badge/Feature-Git%3A%3A%3A%3AshallowClone-green.svg" alt="Featuring Git::shallowClone"&gt;&lt;/a&gt;
&lt;a href="#"&gt;&lt;img src="https://img.shields.io/badge/Warnings-4-yellow.svg" alt="4 Warning(s)"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;install requirements to execute bats&lt;/p&gt;
&lt;h5 id="environment-variables"&gt;Environment variables&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;BASH_FRAMEWORK_BATS_DEPENDENCIES_CHECK_TIMEOUT&lt;/strong&gt; (int): default value 86400 (86400 seconds = 1 day)&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="variables-set"&gt;Variables set&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;BASH_FRAMEWORK_BATS_DEPENDENCIES_INSTALLED&lt;/strong&gt; (String): the file created when all git shallow clones have succeeded&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="output-on-stderr"&gt;Output on stderr&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;diagnostics information is displayed&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="features"&gt;Features&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Git::shallowClone&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="warnings"&gt;Warnings&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;the following repositories are shallow cloned&lt;/li&gt;
&lt;li&gt;cloning is skipped if vendor/.batsInstalled file exists&lt;/li&gt;
&lt;li&gt;a new check is done everyday&lt;/li&gt;
&lt;li&gt;repository is not updated if a change is detected&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="see-also"&gt;See also&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/bats-core/bats-core"&gt;https://github.com/bats-core/bats-core&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/bats-core/bats-support"&gt;https://github.com/bats-core/bats-support&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/bats-core/bats-assert"&gt;https://github.com/bats-core/bats-assert&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Flamefire/bats-mock"&gt;https://github.com/Flamefire/bats-mock&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Namespace src/Cache</title><link>https://bash-tools-framework.devlab.top/bashdoc/cache/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/cache/</guid><description>&lt;h2 id="srccache"&gt;src/Cache&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Cache&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Cache/getFileContentIfNotExpired.sh"&gt;file source src/Cache/getFileContentIfNotExpired.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="cachegetfilecontentifnotexpired"&gt;Cache::getFileContentIfNotExpired&lt;/h4&gt;
&lt;p&gt;get file content if file not expired&lt;/p&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$1&lt;/strong&gt; (file:String): the file to get content from&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$2&lt;/strong&gt; (maxDuration:int): number of seconds after which the file is considered expired&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt;: if file does not exists&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2&lt;/strong&gt;: if file expired&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="output-on-stdout"&gt;Output on stdout&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;{String} the file content if not expired&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srccachegetpropertyvaluesh"&gt;src/Cache/getPropertyValue.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Cache/getPropertyValue.sh"&gt;file source src/Cache/getPropertyValue.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="cachegetpropertyvalue"&gt;Cache::getPropertyValue&lt;/h4&gt;
&lt;p&gt;&lt;a href="#"&gt;&lt;img src="https://img.shields.io/badge/Deprecated-use%20Cache%3A%3A%3A%3AgetPropertyValue2%20instead-red.svg" alt="Deprecated use Cache::getPropertyValue2 instead"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;get property value from file
if not present compute it using propertyNotFoundCallback (if provided) and store it in property file&lt;/p&gt;</description></item><item><title>Namespace src/Command</title><link>https://bash-tools-framework.devlab.top/bashdoc/command/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/command/</guid><description>&lt;h2 id="srccommand"&gt;src/Command&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Command&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Command/captureOutputAndExitCode.sh"&gt;file source src/Command/captureOutputAndExitCode.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="commandcaptureoutputandexitcode"&gt;Command::captureOutputAndExitCode&lt;/h4&gt;
&lt;p&gt;ability to call a command capturing output and exit code
but displaying it also to error output to follow command&amp;rsquo;s progress
command output is sent to COMMAND_OUTPUT and stderr as well in realtime using tee&lt;/p&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&amp;hellip;&lt;/strong&gt; (command:String[]): the command to execute&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="variables-set"&gt;Variables set&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;COMMAND_OUTPUT&lt;/strong&gt; (String): stdout of the command is returned in global variable COMMAND_OUTPUT&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;ul&gt;
&lt;li&gt;exit code of the command&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="output-on-stderr"&gt;Output on stderr&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;command output&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Namespace src/Conf</title><link>https://bash-tools-framework.devlab.top/bashdoc/conf/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/conf/</guid><description>&lt;h2 id="srcconf"&gt;src/Conf&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Conf&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Conf/getAbsoluteFile.sh"&gt;file source src/Conf/getAbsoluteFile.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="confgetabsolutefile"&gt;Conf::getAbsoluteFile&lt;/h4&gt;
&lt;p&gt;get absolute conf file from specified conf folder deduced using these rules&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;from absolute file (ignores &lt;confFolder&gt; and &lt;extension&gt;)&lt;/li&gt;
&lt;li&gt;relative to where script is executed (ignores &lt;confFolder&gt; and &lt;extension&gt;)&lt;/li&gt;
&lt;li&gt;from home/.bash-tools/&lt;confFolder&gt;&lt;/li&gt;
&lt;li&gt;from framework conf/&lt;confFolder&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$1&lt;/strong&gt; (confFolder:String): the directory name (not the path) to list&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$2&lt;/strong&gt; (conf:String): file to use without extension&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$3&lt;/strong&gt; (extension:String): the extension (.sh by default)&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt;: if file is not found in any location&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="output-on-stdout"&gt;Output on stdout&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;absolute conf filename&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcconfgetmergedlistsh"&gt;src/Conf/getMergedList.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Conf/getMergedList.sh"&gt;file source src/Conf/getMergedList.sh&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Namespace src/Crypto</title><link>https://bash-tools-framework.devlab.top/bashdoc/crypto/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/crypto/</guid><description>&lt;h2 id="srccrypto"&gt;src/Crypto&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Crypto&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Crypto/uuidV4.sh"&gt;file source src/Crypto/uuidV4.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="cryptouuidv4"&gt;Crypto::uuidV4&lt;/h4&gt;
&lt;p&gt;generate a UUID in version 4 format&lt;/p&gt;
&lt;h5 id="exit-codes"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt;: if neither /proc/sys/kernel/random/uuid nor uuidgen are available&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="output-on-stderr"&gt;Output on stderr&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;diagnostics information is displayed&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Namespace src/Database</title><link>https://bash-tools-framework.devlab.top/bashdoc/database/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/database/</guid><description>&lt;h2 id="srcdatabase"&gt;src/Database&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Database&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Database/checkDsnFile.sh"&gt;file source src/Database/checkDsnFile.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="databasecheckdsnfile"&gt;Database::checkDsnFile&lt;/h4&gt;
&lt;p&gt;check if dsn file has all the mandatory variables set
Mandatory variables are: HOSTNAME, USER, PASSWORD, PORT&lt;/p&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$1&lt;/strong&gt; (dsnFileName:String): dsn absolute filename&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="variables-set"&gt;Variables set&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;HOSTNAME&lt;/strong&gt; (loaded): from dsn file&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PORT&lt;/strong&gt; (loaded): from dsn file&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;USER&lt;/strong&gt; (loaded): from dsn file&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PASSWORD&lt;/strong&gt; (loaded): from dsn file&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;0&lt;/strong&gt;: on valid file&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt;: if one of the properties of the conf file is invalid or if file not found&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="output-on-stderr"&gt;Output on stderr&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;log output if error found in conf file&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcdatabasecreatedbsh"&gt;src/Database/createDb.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Database/createDb.sh"&gt;file source src/Database/createDb.sh&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Namespace src/Dns</title><link>https://bash-tools-framework.devlab.top/bashdoc/dns/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/dns/</guid><description>&lt;h2 id="srcdns"&gt;src/Dns&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Dns&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Dns/addHost.sh"&gt;file source src/Dns/addHost.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="dnsaddhost"&gt;Dns::addHost&lt;/h4&gt;
&lt;p&gt;&lt;a href="#"&gt;&lt;img src="https://img.shields.io/badge/Feature-Retry%3A%3A%3A%3Adefault-green.svg" alt="Featuring Retry::default"&gt;&lt;/a&gt;
&lt;a href="#"&gt;&lt;img src="https://img.shields.io/badge/Warnings-1-yellow.svg" alt="1 Warning(s)"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;add the line ip hostname at the end of /etc/hosts only if hostname does not exists yet in this file
if wsl do the same in ${BASE_MNT_C}/Windows/System32/drivers/etc/hosts&lt;/p&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;$1 hostName:String&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$2&lt;/strong&gt; (ip:String): optional, default value: 127.0.0.1&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="environment-variables"&gt;Environment variables&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;BASE_MNT_C&lt;/strong&gt; (String):&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SUDO&lt;/strong&gt; (String): allows to use custom sudo prefix command&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="output-on-stderr"&gt;Output on stderr&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;diagnostics information is displayed&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="requires"&gt;Requires&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Git::requireGitCommand&lt;/li&gt;
&lt;li&gt;Linux::requireSudoCommand&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="features"&gt;Features&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Retry::default&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="warnings"&gt;Warnings&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;files are backup before being updated&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcdnscheckhostnamesh"&gt;src/Dns/checkHostname.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Dns/checkHostname.sh"&gt;file source src/Dns/checkHostname.sh&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Namespace src/Docker</title><link>https://bash-tools-framework.devlab.top/bashdoc/docker/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/docker/</guid><description>&lt;h2 id="srcdocker"&gt;src/Docker&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;checkout usage doc below&lt;/p&gt;
&lt;p&gt;&lt;a href="DockerUsage.md" title=":include"&gt;DockerNamespace usage&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Docker/_.sh"&gt;file source src/Docker/_.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="dockerbuildimage"&gt;Docker::buildImage&lt;/h4&gt;
&lt;p&gt;try to docker build image from eventual tagged image cache&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Using DOCKER_BUILDKIT=1&lt;/li&gt;
&lt;li&gt;Using BUILDKIT_INLINE_CACHE in order to use the resulting image as a cache source&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can specify cacheFrom options using the method Docker::getBuildCacheFromArg&lt;/p&gt;
&lt;h5 id="example"&gt;Example&lt;/h5&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;## notice that there is no double quotes around $(Docker::getBuildCacheFromArg bash-tools:tag1 bash-tools:tag2)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Docker::buildImage &lt;span class="s2"&gt;&amp;#34;.&amp;#34;&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;Dockerfile&amp;#34;&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;bash-tools&amp;#34;&lt;/span&gt; &lt;span class="k"&gt;$(&lt;/span&gt;Docker::getBuildCacheFromArg bash-tools:tag1 bash-tools:tag2&lt;span class="k"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$1&lt;/strong&gt; (buildDirectory:String): base directory from where Dockerfile will take hits resources&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$2&lt;/strong&gt; (dockerFilePath:String): docker file path&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$3&lt;/strong&gt; (localImageName:String): the local image name of the resulting image (eg: in ubuntu:latest, ubuntu is the image name&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&amp;hellip;&lt;/strong&gt; (dockerBuildParams:String[]): rest of the parameters to pass to docker build method&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt;: if buildDirectory does not exists&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2&lt;/strong&gt;: if dockerFilePath does not exists&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;3&lt;/strong&gt;: if empty or invalid localImageName&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="output-on-stdout"&gt;Output on stdout&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;{String} the tag that has been successfully pulled, return 1 if no&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="output-on-stderr"&gt;Output on stderr&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;diagnostics information is displayed&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="requires"&gt;Requires&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Docker::requireDockerCommand&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="see-also"&gt;See also&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.docker.com/engine/reference/commandline/build/#specifying-external-cache-sources"&gt;https://docs.docker.com/engine/reference/commandline/build/#specifying-external-cache-sources&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcdockerbuildpushdockerimagesh"&gt;src/Docker/buildPushDockerImage.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Docker/buildPushDockerImage.sh"&gt;file source src/Docker/buildPushDockerImage.sh&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Namespace src/Env</title><link>https://bash-tools-framework.devlab.top/bashdoc/env/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/env/</guid><description>&lt;h2 id="srcenv"&gt;src/Env&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Env&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Env/createDefaultEnvFile.sh"&gt;file source src/Env/createDefaultEnvFile.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="envcreatedefaultenvfile"&gt;Env::createDefaultEnvFile&lt;/h4&gt;
&lt;p&gt;default env file with all default values&lt;/p&gt;
&lt;h5 id="output-on-stdout"&gt;Output on stdout&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;the default env filepath&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcenvpathappendsh"&gt;src/Env/pathAppend.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Env/pathAppend.sh"&gt;file source src/Env/pathAppend.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="envpathappend"&gt;Env::pathAppend&lt;/h4&gt;
&lt;p&gt;append directories to the PATH environment variable&lt;/p&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&amp;hellip;&lt;/strong&gt; (args:String[]): list of directories to append&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="variables-set"&gt;Variables set&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;PATH&lt;/strong&gt; (String): update PATH with the directories appended&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcenvpathprependsh"&gt;src/Env/pathPrepend.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Env/pathPrepend.sh"&gt;file source src/Env/pathPrepend.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="envpathprepend"&gt;Env::pathPrepend&lt;/h4&gt;
&lt;p&gt;prepend directories to the PATH environment variable&lt;/p&gt;
&lt;h5 id="arguments-1"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&amp;hellip;&lt;/strong&gt; (args:String[]): list of directories to prepend&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="variables-set-1"&gt;Variables set&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;PATH&lt;/strong&gt; (update): PATH with the directories prepended&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcenvrequireloadsh"&gt;src/Env/requireLoad.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Env/requireLoad.sh"&gt;file source src/Env/requireLoad.sh&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Namespace src/File</title><link>https://bash-tools-framework.devlab.top/bashdoc/file/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/file/</guid><description>&lt;h2 id="srcfile"&gt;src/File&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/File&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/File/concatenatePath.sh"&gt;file source src/File/concatenatePath.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="fileconcatenatepath"&gt;File::concatenatePath&lt;/h4&gt;
&lt;p&gt;concatenate 2 paths and ensure the path is correct using realpath -m&lt;/p&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;$1 basePath:String&lt;/li&gt;
&lt;li&gt;$2 subPath:String&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="requires"&gt;Requires&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Linux::requireRealpathCommand&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcfilecreateoutputdirsh"&gt;src/File/createOutputDir.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/File/createOutputDir.sh"&gt;file source src/File/createOutputDir.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="filecreateoutputdir"&gt;File::createOutputDir&lt;/h4&gt;
&lt;p&gt;Create an output directory, using a default if the provided path is empty&lt;/p&gt;
&lt;h5 id="example"&gt;Example&lt;/h5&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;File::createOutputDir &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;optionOutputDir&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;optionDefaultOutputDir&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h5 id="arguments-1"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$1&lt;/strong&gt; (outputDir:String): the output directory path (can be empty)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$2&lt;/strong&gt; (defaultOutputDir:String): the default directory to use if outputDir is empty&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="variables-set"&gt;Variables set&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;outputDir&lt;/strong&gt; (the): resolved output directory path&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;0&lt;/strong&gt;: success - directory created or already exists&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt;: failure - failed to create directory&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="output-on-stdout"&gt;Output on stdout&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;none&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcfiledetectbashfilesh"&gt;src/File/detectBashFile.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/File/detectBashFile.sh"&gt;file source src/File/detectBashFile.sh&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Namespace src/Filters</title><link>https://bash-tools-framework.devlab.top/bashdoc/filters/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/filters/</guid><description>&lt;h2 id="srcfilters"&gt;src/Filters&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Filters&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Filters/bashFrameworkFunctions.sh"&gt;file source src/Filters/bashFrameworkFunctions.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="filtersbashframeworkfunctions"&gt;Filters::bashFrameworkFunctions&lt;/h4&gt;
&lt;p&gt;&lt;a href="#"&gt;&lt;img src="https://img.shields.io/badge/Warnings-2-yellow.svg" alt="2 Warning(s)"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;allows to match a bash framework function based on the naming convention&lt;/p&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&amp;hellip;&lt;/strong&gt; (files:String[]): the files in which bash framework functions will be extracted&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="environment-variables"&gt;Environment variables&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;PREFIX&lt;/strong&gt; (String): an eventual prefix you would like to match&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;FRAMEWORK_FUNCTIONS_IGNORE_REGEXP&lt;/strong&gt; (String): this filter does not use this variable&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;0&lt;/strong&gt;: if match or no match&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2&lt;/strong&gt;: if grep fails for other reasons&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="input-on-stdin"&gt;Input on stdin&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;you can alternatively provide content to filter via stdin&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="output-on-stdout"&gt;Output on stdout&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;the list of bash framework function detected&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="warnings"&gt;Warnings&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;this filter could extract bash framework functions that are actually commented in the source file&lt;/li&gt;
&lt;li&gt;use FRAMEWORK_FUNCTIONS_IGNORE_REGEXP from .framework-config to filter unwanted functions&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="see-also"&gt;See also&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://bash-tools-framework.devlab.top/CompileCommand.md#bash_framework_functions_naming_convention"&gt;bash framework functions naming convention&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcfilterscamel2snakecasesh"&gt;src/Filters/camel2snakeCase.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Filters/camel2snakeCase.sh"&gt;file source src/Filters/camel2snakeCase.sh&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Namespace src/Format</title><link>https://bash-tools-framework.devlab.top/bashdoc/format/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/format/</guid><description>&lt;h2 id="srcformat"&gt;src/Format&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Format&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Format/duration.sh"&gt;file source src/Format/duration.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="formatduration"&gt;Format::duration&lt;/h4&gt;
&lt;p&gt;format a duration in seconds to a human readable format&lt;/p&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$1&lt;/strong&gt; (duration:int): in seconds&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="output-on-stdout"&gt;Output on stdout&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;formatted duration&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Namespace src/Framework</title><link>https://bash-tools-framework.devlab.top/bashdoc/framework/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/framework/</guid><description>&lt;h2 id="srcframework"&gt;src/Framework&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Framework&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Framework/createTempFile.sh"&gt;file source src/Framework/createTempFile.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="frameworkcreatetempfile"&gt;Framework::createTempFile&lt;/h4&gt;
&lt;p&gt;create a temp file using default TMPDIR variable&lt;/p&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$1&lt;/strong&gt; (templateName:String): template name to use(optional)&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="environment-variables"&gt;Environment variables&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;TMPDIR&lt;/strong&gt; (String): (default value /tmp)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcframeworkrunsh"&gt;src/Framework/run.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Framework/run.sh"&gt;file source src/Framework/run.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="frameworkrun"&gt;Framework::run&lt;/h4&gt;
&lt;p&gt;run command and store data in global variables&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;bash_framework_status&lt;/li&gt;
&lt;li&gt;bash_framework_duration&lt;/li&gt;
&lt;li&gt;bash_framework_output
redirecting error output to stdout is not supported, you can instead redirect stderr to a file if needed&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="arguments-1"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&amp;hellip;&lt;/strong&gt; (command:String[]): command with arguments to execute&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="variables-set"&gt;Variables set&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;bash_framework_status&lt;/strong&gt; (the): exit status of the command&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;bash_framework_duration&lt;/strong&gt; (the): duration of the command&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;bash_framework_output&lt;/strong&gt; (the): output of the command&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="see-also"&gt;See also&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#commandcaptureoutputandexitcode-as-an-alternative"&gt;Command::captureOutputAndExitCode as an alternative&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcframeworktrapaddsh"&gt;src/Framework/trapAdd.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Framework/trapAdd.sh"&gt;file source src/Framework/trapAdd.sh&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Namespace src/Git</title><link>https://bash-tools-framework.devlab.top/bashdoc/git/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/git/</guid><description>&lt;h2 id="srcgit"&gt;src/Git&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Git&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Git/cloneOrPullIfNoChanges.sh"&gt;file source src/Git/cloneOrPullIfNoChanges.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="gitcloneorpullifnochanges"&gt;Git::cloneOrPullIfNoChanges&lt;/h4&gt;
&lt;p&gt;clone the repository if not done yet, else pull it if no change in it&lt;/p&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$1&lt;/strong&gt; (dir:String): directory in which repository is installed or will be cloned&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$2&lt;/strong&gt; (repo:String): repository url&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$3&lt;/strong&gt; (cloneCallback:Function): callback on successful clone&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$4&lt;/strong&gt; (pullCallback:Function): callback on successful pull&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="environment-variables"&gt;Environment variables&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;GIT_CLONE_OPTIONS:String&lt;/strong&gt; (additional): options to pass to git clone command&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SUDO&lt;/strong&gt; (String): allows to use custom sudo prefix command&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;0&lt;/strong&gt;: on successful pulling/cloning, 1 on failure&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcgitpullifnochangessh"&gt;src/Git/pullIfNoChanges.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Git/pullIfNoChanges.sh"&gt;file source src/Git/pullIfNoChanges.sh&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Namespace src/Github</title><link>https://bash-tools-framework.devlab.top/bashdoc/github/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/github/</guid><description>&lt;h2 id="srcgithub"&gt;src/Github&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Github&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Github/defaultInstall.sh"&gt;file source src/Github/defaultInstall.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="githubdownloadreleaseversion"&gt;Github::downloadReleaseVersion&lt;/h4&gt;
&lt;p&gt;download specified release software version from github&lt;/p&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$1&lt;/strong&gt; (releaseUrl:String): eg: &lt;a href="https://github.com/kubernetes-sigs/kind/releases/download/v1.0.0/kind-linux-amd64"&gt;https://github.com/kubernetes-sigs/kind/releases/download/v1.0.0/kind-linux-amd64&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="environment-variables"&gt;Environment variables&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;CURL_CONNECT_TIMEOUT&lt;/strong&gt; (number): of seconds before giving up host connection&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt;: on failure&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="output-on-stdout"&gt;Output on stdout&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;the path to the downloaded release&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcgithubextractrepofromgithuburlsh"&gt;src/Github/extractRepoFromGithubUrl.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Github/extractRepoFromGithubUrl.sh"&gt;file source src/Github/extractRepoFromGithubUrl.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="githubextractrepofromgithuburl"&gt;Github::extractRepoFromGithubUrl&lt;/h4&gt;
&lt;p&gt;github repository eg: kubernetes-sigs/kind&lt;/p&gt;
&lt;h5 id="arguments-1"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$1&lt;/strong&gt; (githubUrl:String): eg: &lt;a href="https://github.com/kubernetes-sigs/kind/releases/download/@latestVersion@/kind-linux-amd64"&gt;https://github.com/kubernetes-sigs/kind/releases/download/@latestVersion@/kind-linux-amd64&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes-1"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt;: if no matching repo found in provided url, 0 otherwise&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="output-on-stdout-1"&gt;Output on stdout&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;the repo in the form owner/repo&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcgithubgetlatestreleasesh"&gt;src/Github/getLatestRelease.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Github/getLatestRelease.sh"&gt;file source src/Github/getLatestRelease.sh&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Namespace src/Install</title><link>https://bash-tools-framework.devlab.top/bashdoc/install/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/install/</guid><description>&lt;h2 id="srcinstall"&gt;src/Install&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Install&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Install/dir.sh"&gt;file source src/Install/dir.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="installdir"&gt;Install::dir&lt;/h4&gt;
&lt;p&gt;install dir to given directory but backup it before&lt;/p&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$1&lt;/strong&gt; (fromDir:String): the source base directory&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$2&lt;/strong&gt; (toDir:String): the target base directory&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$3&lt;/strong&gt; (dirName:String): the directory relative to fromDir arg that will be copied&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$4&lt;/strong&gt; (userName:String): (optional) (default: ${USERNAME}) the user name that will be used to set target files ownership&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$5&lt;/strong&gt; (userGroup:String): (optional) (default: ${USERNAME}) the group name that will be used to set target files ownership&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="environment-variables"&gt;Environment variables&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;OVERWRITE_CONFIG_FILES&lt;/strong&gt; (Boolean): (default:0) if 1 will overwrite existing directory&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CHANGE_WINDOWS_FILES&lt;/strong&gt; (Boolean): (default:0) if 1 and target directory is in windows file system, overwrite it&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;USERNAME&lt;/strong&gt; ((default:): root) the user name that will be used to set target files ownership&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;USERGROUP&lt;/strong&gt; ((default:): root) the group name that will be used to set target files ownership&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;BASE_MNT_C&lt;/strong&gt; (String): windows C drive base PATH&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;FRAMEWORK_ROOT_DIR&lt;/strong&gt; (used): to make paths relative to this directory to reduce length of messages&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SUDO&lt;/strong&gt; (String): allows to use custom sudo prefix command&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;BACKUP_BEFORE_INSTALL&lt;/strong&gt; (Boolean): (default:1) backup directory before installing the dir&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt;: if source directory is not readable&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2&lt;/strong&gt;: if source directory backup failed&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;0&lt;/strong&gt;: if copy successful or OVERWRITE_CONFIG_FILES=0 or&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;0&lt;/strong&gt;: with warning message if OVERWRITE_CONFIG_FILES=0 and target directory exists&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;0&lt;/strong&gt;: with warning message if CHANGE_WINDOWS_FILES=0 and target directory in C drive&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="output-on-stderr"&gt;Output on stderr&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;diagnostics information is displayed, skipped information if OVERWRITE_CONFIG_FILES or CHANGE_WINDOWS_FILES are set to 1&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcinstallfilesh"&gt;src/Install/file.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Install/file.sh"&gt;file source src/Install/file.sh&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Namespace src/Log</title><link>https://bash-tools-framework.devlab.top/bashdoc/log/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/log/</guid><description>&lt;h2 id="srclog"&gt;src/Log&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Log namespace provides 2 kind of functions&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Log::display* allows to display given message with
given display level&lt;/li&gt;
&lt;li&gt;Log::log* allows to log given message with
given log level
Log::display* functions automatically log the message too&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Log/_.sh"&gt;file source src/Log/_.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="logcomputeduration"&gt;Log::computeDuration&lt;/h4&gt;
&lt;p&gt;compute duration since last call to this function
the result is set in following env variables.
in ss.sss (seconds followed by milliseconds precision 3 decimals)&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Function has no arguments.&lt;/em&gt;&lt;/p&gt;
&lt;h5 id="environment-variables"&gt;Environment variables&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;DISPLAY_DURATION&lt;/strong&gt; (int): (default 0) if 1 display elapsed time information between 2 info logs&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="variables-set"&gt;Variables set&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;LOG_LAST_LOG_DATE_INIT&lt;/strong&gt; (int): (default 1) set to 0 at first call, allows to detect reference log&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LOG_LAST_DURATION_STR&lt;/strong&gt; (String): the last duration displayed&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LOG_LAST_LOG_DATE&lt;/strong&gt; (String): the last log date that will be used to compute next diff&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srclogdisplaydebugsh"&gt;src/Log/displayDebug.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Log/displayDebug.sh"&gt;file source src/Log/displayDebug.sh&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Namespace src/Profiles</title><link>https://bash-tools-framework.devlab.top/bashdoc/profiles/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/profiles/</guid><description>&lt;h2 id="srcprofiles"&gt;src/Profiles&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Profiles&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Profiles/allDepsRecursive.sh"&gt;file source src/Profiles/allDepsRecursive.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="profilesalldepsrecursive"&gt;Profiles::allDepsRecursive&lt;/h4&gt;
&lt;p&gt;&lt;a href="#"&gt;&lt;img src="https://img.shields.io/badge/Warnings-1-yellow.svg" alt="1 Warning(s)"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;get recursively all the dependencies of each config from configs arg&lt;/p&gt;
&lt;p&gt;The parent argument must be set to &amp;ldquo;your software selection&amp;rdquo; when you call it,
then the value will change when this function will be called recursively with the
parent dependency&lt;/p&gt;
&lt;p&gt;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&lt;/p&gt;</description></item><item><title>Namespace src/Retry</title><link>https://bash-tools-framework.devlab.top/bashdoc/retry/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/retry/</guid><description>&lt;h2 id="srcretry"&gt;src/Retry&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Retry&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Retry/default.sh"&gt;file source src/Retry/default.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="retrydefault"&gt;Retry::default&lt;/h4&gt;
&lt;p&gt;Retry a command 5 times with a delay of 15 seconds between each attempt&lt;/p&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&amp;hellip;&lt;/strong&gt; (command:String[]): the command to run&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="environment-variables"&gt;Environment variables&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;RETRY_MAX_RETRY&lt;/strong&gt; (int): max retries&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;RETRY_DELAY_BETWEEN_RETRIES&lt;/strong&gt; (int): delay between attempts&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;0&lt;/strong&gt;: on success&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt;: if max retries count reached&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcretryparameterizedsh"&gt;src/Retry/parameterized.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Retry/parameterized.sh"&gt;file source src/Retry/parameterized.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="retryparameterized"&gt;Retry::parameterized&lt;/h4&gt;
&lt;p&gt;Retry a command several times depending on parameters&lt;/p&gt;
&lt;h5 id="arguments-1"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$1&lt;/strong&gt; (maxRetries:int): $1 max retries&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$2&lt;/strong&gt; (delay:int): between attempt&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$3&lt;/strong&gt; (message:String): to display to describe the attempt&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&amp;hellip;&lt;/strong&gt; (rest): of parameters, the command to run&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes-1"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;0&lt;/strong&gt;: on success&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt;: if max retries count reached&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2&lt;/strong&gt;: if maxRetries invalid value&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Namespace src/ShellDoc</title><link>https://bash-tools-framework.devlab.top/bashdoc/shelldoc/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/shelldoc/</guid><description>&lt;h2 id="srcshelldoc"&gt;src/ShellDoc&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/ShellDoc&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/ShellDoc/fixMarkdownToc.sh"&gt;file source src/ShellDoc/fixMarkdownToc.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="shelldocfixmarkdowntoc"&gt;ShellDoc::fixMarkdownToc&lt;/h4&gt;
&lt;p&gt;fix markdown TOC generated by Markdown all in one vscode extension
to make TOC compatible with docsify&lt;/p&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$1&lt;/strong&gt; (file:String): file to fix&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt;: if awk fails&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="see-also"&gt;See also&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://regex101.com/r/DJJf2I/1"&gt;https://regex101.com/r/DJJf2I/1&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcshelldocgeneratemdfilefromtemplatesh"&gt;src/ShellDoc/generateMdFileFromTemplate.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/ShellDoc/generateMdFileFromTemplate.sh"&gt;file source src/ShellDoc/generateMdFileFromTemplate.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="shelldocgeneratemdfilefromtemplate"&gt;ShellDoc::generateMdFileFromTemplate&lt;/h4&gt;
&lt;p&gt;generates markdown file from template by
replacing @@@command_help@@@ by the help of the command
eg: @@@test_help@@@ will be replaced by the output
of the command &lt;code&gt;test --help&lt;/code&gt; in the directory provided&lt;/p&gt;</description></item><item><title>Namespace src/Softwares</title><link>https://bash-tools-framework.devlab.top/bashdoc/softwares/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/softwares/</guid><description>&lt;h2 id="srcsoftwares"&gt;src/Softwares&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Softwares&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Softwares/installHadolint.sh"&gt;file source src/Softwares/installHadolint.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="softwaresinstallhadolint"&gt;Softwares::installHadolint&lt;/h4&gt;
&lt;p&gt;&lt;a href="#"&gt;&lt;img src="https://img.shields.io/badge/Feature-Github%3A%3A%3A%3AupgradeRelease-green.svg" alt="Featuring Github::upgradeRelease"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;install hadolint if necessary&lt;/p&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;$1 targetFile:String&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="features"&gt;Features&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Github::upgradeRelease&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcsoftwaresinstallshellchecksh"&gt;src/Softwares/installShellcheck.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Softwares/installShellcheck.sh"&gt;file source src/Softwares/installShellcheck.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="softwaresinstallshellcheck"&gt;Softwares::installShellcheck&lt;/h4&gt;
&lt;p&gt;&lt;a href="#"&gt;&lt;img src="https://img.shields.io/badge/Feature-Github%3A%3A%3A%3AupgradeRelease-green.svg" alt="Featuring Github::upgradeRelease"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;install hadolint if necessary&lt;/p&gt;
&lt;h5 id="arguments-1"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;$1 targetFile:String&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$2&lt;/strong&gt; (maxAge:int): in seconds, default to 1 month&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="features-1"&gt;Features&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Github::upgradeRelease&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Namespace src/Ssh</title><link>https://bash-tools-framework.devlab.top/bashdoc/ssh/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/ssh/</guid><description>&lt;h2 id="srcssh"&gt;src/Ssh&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Ssh&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Ssh/checkAccess.sh"&gt;file source src/Ssh/checkAccess.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="sshcheckaccess"&gt;Ssh::checkAccess&lt;/h4&gt;
&lt;p&gt;check if host can accessed using ssh private key
without requiring interactivity&lt;/p&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$1&lt;/strong&gt; (host:String): the host to join&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&amp;hellip;&lt;/strong&gt; (args:String[]): other parameters to pass to the ssh command&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt;: if ssh fails&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2&lt;/strong&gt;: if missing host argument&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="requires"&gt;Requires&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Ssh::requireSshCommand&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcsshfixauthenticityofhostcantbeestablishedsh"&gt;src/Ssh/fixAuthenticityOfHostCantBeEstablished.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Ssh/fixAuthenticityOfHostCantBeEstablished.sh"&gt;file source src/Ssh/fixAuthenticityOfHostCantBeEstablished.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="sshfixauthenticityofhostcantbeestablished"&gt;Ssh::fixAuthenticityOfHostCantBeEstablished&lt;/h4&gt;
&lt;p&gt;Fix ssh issues&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The authenticity of host &amp;lsquo;&lt;a href="https://www.host.net"&gt;www.host.net&lt;/a&gt; (140.82.121.4)&amp;rsquo; can&amp;rsquo;t be established&lt;/li&gt;
&lt;li&gt;And Offending key for IP&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="arguments-1"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$1&lt;/strong&gt; (host:String): the host to fix&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="environment-variables"&gt;Environment variables&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;HOME&lt;/strong&gt; (String):&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes-1"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt;: is ssh-keygen fails&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="requires-1"&gt;Requires&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Ssh::requireSshKeygenCommand&lt;/li&gt;
&lt;li&gt;Ssh::requireSshKeyscanCommand&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcsshrequiresshcommandsh"&gt;src/Ssh/requireSshCommand.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Ssh/requireSshCommand.sh"&gt;file source src/Ssh/requireSshCommand.sh&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Namespace src/UI</title><link>https://bash-tools-framework.devlab.top/bashdoc/ui/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/ui/</guid><description>&lt;h2 id="srcui"&gt;src/UI&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/UI&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/UI/askToContinue.sh"&gt;file source src/UI/askToContinue.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="uiasktocontinue"&gt;UI::askToContinue&lt;/h4&gt;
&lt;p&gt;ask the user if he wishes to continue a process&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Input&lt;/strong&gt;: user input y or Y characters
&lt;strong&gt;Output&lt;/strong&gt;: displays message &lt;pre&gt;Are you sure, you want to continue (y or n)?&lt;/pre&gt;
&lt;strong&gt;Exit&lt;/strong&gt;: with error code 1 if y or Y, other keys do nothing&lt;/p&gt;
&lt;h3 id="srcuiasktoignoreoverwriteabortsh"&gt;src/UI/askToIgnoreOverwriteAbort.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/UI/askToIgnoreOverwriteAbort.sh"&gt;file source src/UI/askToIgnoreOverwriteAbort.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="uiasktoignoreoverwriteabort"&gt;UI::askToIgnoreOverwriteAbort&lt;/h4&gt;
&lt;p&gt;ask the user to ignore(i), overwrite(o) or abort(a)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Input&lt;/strong&gt;: user input any characters&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt;:&lt;/p&gt;</description></item><item><title>Namespace src/Version</title><link>https://bash-tools-framework.devlab.top/bashdoc/version/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/version/</guid><description>&lt;h2 id="srcversion"&gt;src/Version&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Version&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Version/checkMinimal.sh"&gt;file source src/Version/checkMinimal.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="versioncheckminimal"&gt;Version::checkMinimal&lt;/h4&gt;
&lt;p&gt;Check that command version is greater than expected minimal version
display warning if command version greater than expected minimal version
display error if command version less than expected minimal version and exit 1&lt;/p&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$1&lt;/strong&gt; (commandName:String): command path&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$2&lt;/strong&gt; (argVersion:String): command line parameters to launch to get command version&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$3&lt;/strong&gt; (minimalVersion:String): expected minimal command version&lt;/li&gt;
&lt;li&gt;$4 parseVersionCallback:Function&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;$5&lt;/strong&gt; (help:String): optional help message to display if command does not exist&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="exit-codes"&gt;Exit codes&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;0&lt;/strong&gt;: if command version greater or equal to expected minimal version&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt;: if command version less than expected minimal version&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2&lt;/strong&gt;: if command does not exist&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcversioncomparesh"&gt;src/Version/compare.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Version/compare.sh"&gt;file source src/Version/compare.sh&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Namespace src/Web</title><link>https://bash-tools-framework.devlab.top/bashdoc/web/</link><pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate><guid>https://bash-tools-framework.devlab.top/bashdoc/web/</guid><description>&lt;h2 id="srcweb"&gt;src/Web&lt;/h2&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;Directory src/Web&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Web/getReleases.sh"&gt;file source src/Web/getReleases.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="webgetreleases"&gt;Web::getReleases&lt;/h4&gt;
&lt;p&gt;Retrieve the latest version number of a web release&lt;/p&gt;
&lt;h5 id="arguments"&gt;Arguments&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$1&lt;/strong&gt; (releaseListUrl:String): the url from which version list can be retrieved&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="environment-variables"&gt;Environment variables&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;CURL_CONNECT_TIMEOUT&lt;/strong&gt; (number): of seconds before giving up host connection&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="output-on-stdout"&gt;Output on stdout&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;log messages about retry&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="srcwebupgradereleasesh"&gt;src/Web/upgradeRelease.sh&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/fchastanet/bash-tools-framework/tree/master/src/Web/upgradeRelease.sh"&gt;file source src/Web/upgradeRelease.sh&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="webupgraderelease"&gt;Web::upgradeRelease&lt;/h4&gt;
&lt;p&gt;upgrade given binary to latest release using retry&lt;/p&gt;
&lt;p&gt;releasesUrl argument : the placeholder @latestVersion@ will be replaced by the latest release version&lt;/p&gt;</description></item></channel></rss>