diff options
| author | TitanSnow <[email protected]> | 2017-04-24 12:32:02 +0800 |
|---|---|---|
| committer | TitanSnow <[email protected]> | 2017-04-24 12:34:37 +0800 |
| commit | 748dacd2ada91b3f0b373552e9b9c9d472f2d8a8 (patch) | |
| tree | f7d9a0dcba269c9f797a12ae5f0991942b3fa0c0 /scripts | |
| parent | c3c37385fc23439c28b97b113be0fce8aef947b8 (diff) | |
add __local__
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/get.sh | 7 |
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) |
