From 10f5a0cf4441565b66d9fe2682ee78fbaab73fa9 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 27 Jun 2019 23:58:09 +0800 Subject: improve get.sh --- scripts/get.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/get.sh b/scripts/get.sh index 9b06b49b6..ed8db71be 100755 --- a/scripts/get.sh +++ b/scripts/get.sh @@ -111,7 +111,9 @@ then git clone --depth=1 -b "$branch" "https://github.com/$mirror/xmake.git" --recursive $projectdir || my_exit "$(echo -e 'Clone Fail\nCheck your network or branch name')" fi else - git submodule update --init --recursive + if [ -d '.git' ]; then + git submodule update --init --recursive + fi projectdir=`pwd` fi if [ 'x__install_only__' != "x$2" ] -- cgit v1.3.1