summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTitanSnow <[email protected]>2017-04-24 12:32:02 +0800
committerTitanSnow <[email protected]>2017-04-24 12:34:37 +0800
commit748dacd2ada91b3f0b373552e9b9c9d472f2d8a8 (patch)
treef7d9a0dcba269c9f797a12ae5f0991942b3fa0c0 /scripts
parentc3c37385fc23439c28b97b113be0fce8aef947b8 (diff)
add __local__
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/get.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/get.sh b/scripts/get.sh
index 273ae1f17..11a72d854 100755
--- a/scripts/get.sh
+++ b/scripts/get.sh
@@ -63,7 +63,12 @@ then
branch="-b $1"
echo "Branch: $1"
fi
-git clone --depth=1 $branch https://github.com/tboox/xmake.git /tmp/$$xmake_getter || my_exit 'Clone Fail'
+if [ 'x-b __local__' != "x$branch" ]
+then
+ git clone --depth=1 $branch https://github.com/tboox/xmake.git /tmp/$$xmake_getter || my_exit 'Clone Fail'
+else
+ cp -r "$(git rev-parse --show-toplevel 2>/dev/null || hg root 2>/dev/null || echo $PWD)" /tmp/$$xmake_getter || my_exit 'Clone Fail'
+fi
make -C /tmp/$$xmake_getter --no-print-directory build || my_exit 'Build Fail'
IFS=':'
patharr=($PATH)