summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorruki <[email protected]>2017-09-14 00:34:21 +0800
committerruki <[email protected]>2017-09-13 21:26:10 +0800
commit242940f50d4361c073ec931b4a707e76205c956d (patch)
treed7d40d91ea8318d3aec9185b00a40861ec9f1188 /scripts
parentd0ab158cac68ffc22396c8d9a83624625ca05f7c (diff)
fix get.sh bug
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/get.sh15
1 files changed, 8 insertions, 7 deletions
diff --git a/scripts/get.sh b/scripts/get.sh
index 6e417b98c..364a0d884 100755
--- a/scripts/get.sh
+++ b/scripts/get.sh
@@ -104,25 +104,26 @@ then
fi
echo "Branch: $branch"
fi
+projectdir=$tmpdir
if [ 'x__local__' != "x$branch" ]
then
- git clone --depth=50 -b "$branch" "https://github.com/$mirror/xmake.git" $tmpdir || my_exit "$(echo -e 'Clone Fail\nCheck your network or branch name')"
+ 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
- cd $tmpdir || my_exit 'Chdir Error'
+ cd $projectdir || my_exit 'Chdir Error'
git checkout -qf "$2"
cd - || my_exit 'Chdir Error'
fi
else
- tmpdir=`pwd`
+ projectdir=`pwd`
fi
if [ 'x__install_only__' != "x$2" ]
then
- make -C $tmpdir --no-print-directory build
+ make -C $projectdir --no-print-directory build
rv=$?
if [ $rv -ne 0 ]
then
- make -C $tmpdir/core --no-print-directory error
+ make -C $projectdir/core --no-print-directory error
my_exit "$(echo -e 'Build Fail\nDetail:\n' | cat - /tmp/xmake.out)" $rv
fi
fi
@@ -134,9 +135,9 @@ fi
if [ "x$prefix" != x ]
then
- make -C $tmpdir --no-print-directory install prefix="$prefix"|| my_exit 'Install Fail'
+ make -C $projectdir --no-print-directory install prefix="$prefix"|| my_exit 'Install Fail'
else
- $sudoprefix make -C $tmpdir --no-print-directory install || my_exit 'Install Fail'
+ $sudoprefix make -C $projectdir --no-print-directory install || my_exit 'Install Fail'
fi
write_profile()
{