summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/get.sh12
1 files changed, 4 insertions, 8 deletions
diff --git a/scripts/get.sh b/scripts/get.sh
index e89afea97..c9cdaff3e 100755
--- a/scripts/get.sh
+++ b/scripts/get.sh
@@ -46,11 +46,6 @@ echo ' > < | \__/ | /_| | < ___/ '
echo ' /_/\_\_|_| |_|\__ \|_|\_\____| getter '
echo ' '
-if [ 'x__local__' != "x$1" ]
-then
- brew --version >/dev/null 2>&1 && brew install --HEAD xmake && xmake --version && exit
-fi
-
my_exit(){
rv=$?
if [ "x$1" != x ]
@@ -107,12 +102,13 @@ fi
projectdir=$tmpdir
if [ 'x__local__' != "x$branch" ]
then
- git clone --depth=50 -b "$branch" "https://github.com/$mirror/xmake.git" $projectdir || my_exit "$(echo -e 'Clone Fail\nCheck your network or branch name')"
- if [ x != "x$2" ]
- then
+ if [ x != "x$2" ]; then
+ git clone --depth=50 -b "$branch" "https://github.com/$mirror/xmake.git" --recursive $projectdir || my_exit "$(echo -e 'Clone Fail\nCheck your network or branch name')"
cd $projectdir || my_exit 'Chdir Error'
git checkout -qf "$2"
cd - || my_exit 'Chdir Error'
+ else
+ 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
projectdir=`pwd`