summaryrefslogtreecommitdiff
path: root/scripts/get.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/get.sh')
-rwxr-xr-xscripts/get.sh4
1 files changed, 3 insertions, 1 deletions
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" ]