summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorruki <[email protected]>2019-06-27 00:42:31 +0800
committerruki <[email protected]>2019-06-26 22:15:09 +0800
commit9f73278f8f7631bc53daba27ffdf84d96068c562 (patch)
tree30fa1f498f2708a559440854fafc04295f13b5dd /scripts
parent78aff8d5199448d604c8e9456063f9550d00c6b6 (diff)
fix get.sh and improve update
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`