From be913e3c11dc7e7be204e3103350af3fcb910f44 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Sat, 5 Dec 2020 08:52:16 -0500 Subject: slighty better make version checking --- dm | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/dm b/dm index 2fb3424..2a085fd 100755 --- a/dm +++ b/dm @@ -11,13 +11,16 @@ fi chmod 600 SUBSTS.local -if [ `uname` = "Linux" ]; then - make --version | grep "GNU Make" > /dev/null 2>&1 || { echo "Please install GNU Make"; exit 1; } - MAKE=`command -v make` -else - command -v gmake > /dev/null 2>&1 || { echo "Please install GNU Make"; exit 1; } - MAKE=`command -v gmake` -fi +case `uname` in + Linux|Darwin) + make --version | grep "GNU Make" > /dev/null 2>&1 || { echo "Please install GNU Make"; exit 1; } + MAKE=`command -v make` + ;; + *) + command -v gmake > /dev/null 2>&1 || { echo "Please install GNU Make"; exit 1; } + MAKE=`command -v gmake` + ;; +esac ${MAKE} -f Makefile $@ -- cgit v1.2.3