From 748dacd2ada91b3f0b373552e9b9c9d472f2d8a8 Mon Sep 17 00:00:00 2001 From: TitanSnow Date: Mon, 24 Apr 2017 12:32:02 +0800 Subject: add __local__ --- scripts/get.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts') 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) -- cgit v1.3.1