Skip to content

Prints a list of installed software and their versions.

License

Notifications You must be signed in to change notification settings

ScriptFUSION/whatigot.bash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

whatigot.bash

Build status

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.

Contents

  1. Example output
  2. Installation
  3. Supported software
  4. Testing

Example output

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

Installation

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

Supported software

When the script runs it will search for the following software and print its version number if found.

Adding new software support

It's easy to add support for your favourite software! Just follow these steps.

  1. Add a function to whatigot.bash, in alphabetical order, and ensure it's called at the end.
  2. Ensure the relevant package is installed for each test environment.
  3. Add a test case to the test script.
  4. Update the readme.
  5. Create a pull request!

Testing

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 new test environments

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.

  1. Create a directory named after the distribution.
  2. Add a Dockerfile to the distribution directory that installs all the supported software.
  3. Add the distribution directory name with a DIST key to the env matrix in .travis.yml.
  4. Update the readme.
  5. Create a pull request!

About

Prints a list of installed software and their versions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages