summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2020-01-21 18:30:04 +0800
committerOpportunityLiu <[email protected]>2020-01-21 18:30:04 +0800
commitd9fff6a0f984714afc050ad204329a18cbe74278 (patch)
tree185e452759e113ce3346ff5607b2f5200bc83e6b /scripts
parent91e30c6b31122d74ce147467ccbf685255a69f6b (diff)
fix script
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/get.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/get.sh b/scripts/get.sh
index 607a4cbc2..2e4b0acea 100755
--- a/scripts/get.sh
+++ b/scripts/get.sh
@@ -115,13 +115,13 @@ if [ x != "x$1" ]; then
echo "Branch: $branch"
fi
projectdir=$tmpdir
-if [ 'x__local__' == "x$branch" ]; then
+if [ 'x__local__' = "x$branch" ]; then
if [ -d '.git' ]; then
git submodule update --init --recursive
fi
cp -r . $projectdir
cd $projectdir || my_exit 'Chdir Error'
-elif [ 'x__run__' == "x$branch" ]; then
+elif [ 'x__run__' = "x$branch" ]; then
version=$(git ls-remote --tags "https://github.com/$mirror/xmake" | tail -c 7)
if xz --version >/dev/null 2>&1
then
@@ -175,7 +175,11 @@ install_profile()
{
if [ ! -d ~/.xmake ]; then mkdir ~/.xmake; fi
echo "export PATH=$prefix/bin:\$PATH" > ~/.xmake/profile
- remote_get_content "https://github.com/$mirror/xmake/raw/master/scripts/register-completions.sh" >> ~/.xmake/profile
+ if [ 'x__local__' = "x$branch" ] && [ -f './scripts/register-completions.sh']; then
+ cat './scripts/register-completions.sh' >> ~/.xmake/profile
+ else
+ remote_get_content "https://github.com/$mirror/xmake/raw/master/scripts/register-completions.sh" >> ~/.xmake/profile
+ fi
if [[ "$SHELL" = */zsh ]]; then
write_profile ~/.zshrc