A Bash script that prints a list of installed software and their versions. The system is probed to find the major system software installed, such as services and programming languages, and their corresponding versions. Useful for exploring new systems or comparing software installations between boxes.
The goal of whatigot is to only list intentionally installed software. This is quite different from the output one might get from a package manager, which typically lists every package, many of which are just dependencies of the software we really care about. For this reason we do not list libraries or members of the GNU Coreutils.
Each line of output comprises the name of the software, suffixed with a colon and a space, followed by the version as a single token. Any additional information, such as build number, is stripped away so the output is limited to two columns. Some distributions modify the software and suffix additional identifiers to the version number, such as in the following BIND example; this is kept.
./whatigot.bash
BIND: 9.9.4-RedHat-9.9.4-51.el7
Docker: 1.12.6
ImageMagick: 6.7.8-9
MongoDB: 2.6.12
NGINX: 1.10.2
Either clone this repository with Git or download the script and set the executable bit as shown in the following steps.
wget https://raw.githubusercontent.com/ScriptFUSION/whatigot.bash/master/whatigot.bash
chmod +x whatigot.bash
./whatigot.bash
Optionally, move it to somewhere on the PATH to run it like a normal system command.
sudo mv whatigot.bash /usr/local/bin/whatigot
whatigot
When the script runs it will search for the following software and print its version number if found.
- BIND
- Composer
- Docker
- ExifTool
- ImageMagick
- MongoDB
- NGINX
- OpenDKIM
- Perl
- PHP
- Postfix
- Python
- Squid
- Varnish
- ZNC
It's easy to add support for your favourite software! Just follow these steps.
- Add a function to
whatigot.bash
, in alphabetical order, and ensure it's called at the end. - Ensure the relevant package is installed for each test environment.
- Add a test case to the
test
script. - Update the readme.
- Create a pull request!
Pull requests are automatically tested by Travis, for each distribution, in parallel. The following distributions are currently tested.
Docker builds test environments for each distribution, installs all the software and copies in the script. The script runs inside the Docker environment and its output is captured and tested by Travis using the test
script.
Adding a new test environment becomes iteratively more taxing as we support more software, and conversely, supporting more software becomes more difficult the more test environments we have. Therefore we'd like to keep the number of test environments limited to the minimum necessary to prove the software works.
Since CentOS is based on RedHat, it is supposed testing CentOS should be sufficient to prove RedHat works, and we therefore do not need a separate RedHat testing environment. Of course, if this proves false, we may consider adding additional RedHat testing support, but please consider creating an issue to discuss whether we should support a new environment before doing any work to avoid the risk of rejection!
To add support for a new test environment follow these steps.
- Create a directory named after the distribution.
- Add a
Dockerfile
to the distribution directory that installs all the supported software. - Add the distribution directory name with a
DIST
key to theenv
matrix in.travis.yml
. - Update the readme.
- Create a pull request!