From 4e9ed3adccf9c30df6c2c2c70683af8136ebacab Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Mon, 16 Jul 2012 13:59:05 -0700 Subject: [PATCH] compat: check if git is installed on get-compat-trees Bail out if it is not present. Signed-off-by: Luis R. Rodriguez --- bin/get-compat-trees | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/get-compat-trees b/bin/get-compat-trees index 78171641e306..25425c7aae14 100755 --- a/bin/get-compat-trees +++ b/bin/get-compat-trees @@ -29,6 +29,12 @@ GIT_TREES="$GIT_TREES git://github.com/mcgrof/compat-wireless.git" LINUX_GIT="git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git" +which git +if [[ $? -ne 0 ]]; then + echo -e "You need to install ${PURPLE}git${NORMAL}" + exit 1 +fi + echo -e "This will download xxx amount of code from git trees." read -p "Do you still want to continue (y/N)? " -- 2.30.2