diff --git a/functions.sh b/functions.sh index 3999ce39..67c2c80a 100644 --- a/functions.sh +++ b/functions.sh @@ -16,6 +16,16 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Distro check functions +function is_fedora { + lsb_release -i 2>/dev/null | grep -iq "fedora" +} + +function is_ubuntu { + lsb_release -i 2>/dev/null | grep -iq "ubuntu" +} + + function function_exists { type $1 2>/dev/null | grep -q 'is a function' }