The Linux base-distro detector (LDD) is a simple yet effective non-interactive routine for detecting the base distribution you're running on. It is intended to support other scripts or to be used as a library. Though, it can be executed as a regular script.
![]()
Initially, regarding the readers who will read this document, humans or not, it is respectful to explain what may seem obvious to some: this file is a manual for its own directory, and only for its own directory.
Also, make sure the script(s) to be used are properly configured with execution permission(s).
This section covers dependencies of many types, e.g., packages, programming languages, and environments. It should also mention versions.
Surely, if you want to clone this project from a Git repo, e.g., a SourceForge repo, the first thing expected to be available for you is Git.
Installation instructions are available on the install script itself.
LDD can be cloned and/or downloaded and executed with a command template like the one following.
ni-detect_distro.sh [--dir DIR] [--log LOG] [--verbose]
LDD needs to persist stuff, e.g., logs. [--dir DIR] is an option to inform a custom path, which is expected to be a complete path to a directory onto which LDD stuff should be persisted. Default value is ${HOME}/.ni-detect_distro/. That's the directory to be used if the referred option is ommitted. If you're willing to change it, please remember to properly finish the directory path with a slash character.
[--log LOG] is a complete path to a log file. Default is ${HOME}/.ni-detect_distro/log.log.
[--verbose] makes LDD print messages to stdout.
Mostly, the directory structure presented by this section is that of a version control-oriented software repository.
The .ignore/ directory is ignored by version control, e.g., Git. So you can make one for yourself, and use it to persist stuff which should not be controlled by version control. Make sure it is ignored by version control, i.e., if you are using Git, the .ignore/ directory should be present on the .gitignore file.
The doc/ directory, if present, shelters published content from this project's maintainer(s), e.g., regarding this project's documentation.
The lib/ directory, if present, shelters content being used somewhere in this directory, as long as the referred content do not belong to the src/ directory. Examples of content are software code (binaries, sources and/or scripts) and PNG files.
The sw/ directory shelters both binary and text executable files which do not belong to the lib/ directory, e.g., the sw/bin/ subdirectory, which shelters binary executable files, and the sw/src/ subdirectory, which shelters sources, whether executable or not. Also, the install.sh file do not belong to this directory.
In a project using Git, the .gitignore file lists what Git should ignore inside your repository, e.g., stuff on the .ignore/ directory.
The .relations.txt file, sometimes present, resembles what software engineering calls a traceability matrix. It relates this project with others.
Besides having its versions controlled, this project adopts an rsync-based backup strategy, and this is the reason why the .rsyncignore file exists.
You can contribute with this project, be it in technical form or in financial donation form.
If you're in Brasil, you can make a Pix transfer to Pix ID marcio.barbado@bdslabs.com.br.
