I operate in an environment that uses both git-bash and cygwin bash. There are probably other flavors as well. What is the easiest way to robustly identify which bash flavor is running?
IMPLEMENTATION NOTE: There are a lot of non-trivial ways to do this; there are a lot of ways to make potential solutions fail.
Here's how one developer does this: Update the .bashrc by adding an environment variable. In scripts, check the value of the environment variable. Pro: easy. Con: This requires the modification of 2 .bashrc files.