Versions
- versions.bsh
A set of functions for determining the versions of specific programs.
- git_version
Retrieves the version number of git.
- Parameters:
[
GIT] - Thegitexecutable that will be called. Can be overwritten to call a different executable. Defaults togit.- Output:
stdout - The
gitversion number
- docker_version
Retrieves the version number of docker.
- Parameters:
[
DOCKER] - Thedockerexecutable that will be called. Can be overwritten to call a different executable. Defaults todocker.- Output:
stdout - The
dockerversion number
- docker_compose_version
Retrieves the version number of docker compose.
- Parameters:
[
DOCKER_COMPOSE] - Thedocker composecommand that will be called. Can be overwritten to call a different executable. Defaults todocker compose.- Output:
stdout - The
docker composeversion number
- bash_version
Retrieves the version number of bash.
- Parameters:
[
BASH] - Thebashexecutable that will be called. Can be overwritten to call a different executable. Defaults tobash.- Output:
stdout - The
bashversion number
- glibc_version
Retrieves the version number of glibc currently uses by the OS
- Parameters:
[
LDD] - Thelddexecutable that will be called to determine glibc version. Can be overwritten to call a different executable. Defaults to/usr/glibc-compat/bin/lddorldd.- Output:
stdout - The glibc version number. Blank if it failed, which probably means glibc is not the default on this operating system.
- glibc_version_manual
Retrieves the version number of a speific glibc library
- Arguments:
$1- Path to glibc, usually something like /lib64/libc.so.6
- Output:
stdout - The glibc version number.
Example
libc_filename="$(ldconfig -p 2>/dev/null| \grep '^\s*libc\.so' | awk '{print $NF; exit}')"
echo "The glibc version is: $(glibc_version_manual "${libc_filename}")"
- tar_version_info
Sets the vendor and version number of tar.
- Parameters:
[
TAR] - Thetarexecutable that will be called. Can be overwritten to call a different executable. Defaults totar.- Output:
tar_vendor- Thetarvendor (BSD or GNU)tar_version- Thetarversion number
- openssh_version
Sets the vendor and version number of ssh.
- Parameters:
[
SSH] - Thesshexecutable that will be called. Can be overwritten to call a different executable. Defaults tossh.- Output:
ssh_version- Thesshversion numberssl_vendor- The SSL vendor linked to sshssl_version- The SSL version linked to ssh
- nvcc_version
Determine the version of nvcc
- Parameters:
[
$NVCC] - Thenvccexecutable that will be called. Can be overwritten to call a different executable. Default:nvcc- Output:
stdout - Version of
nvcc
- version_txt_cuda_version
Parses the version.txt file left behind by some CUDA installs (Version 5.5 through 11.0. 11.0 only installs it as part of the “docs” package).
For versions of CUDA that are patched, the highest version number is returned.
- Parameters:
[
$1] - Filename ofversion.txtfile. Default: Read from stdin
- version_json_cuda_version
Parses the version.json file left behind by some CUDA installs (11.2 or newer).
- Parameters:
[
$1] - Filename ofversion.jsonfile. Default: Read from stdin
- gpg_version
Determine the version of gpg
- Parameters:
[
$GPG] - Thegpgexecutable that will be called. Can be overwritten to call a different executable. Default:gpg2- Output:
stdout - Version of
gpg
- singularity_version_info
Sets the vendor and version number of singularity aka apptainer aka Singularity CE
- Parameters:
[
SINGULARITY] - Thesingularityexecutable that will be called. Can be overwritten to call a different executable. Defaults tosingularity.- Output:
singularity_vendor- Thesingularityvendor (BSD or GNU)singularity_version- Thesingularityversion number