summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2020-01-21 18:43:27 +0800
committerOpportunityLiu <[email protected]>2020-01-21 18:43:27 +0800
commitfd4d3885e8bf4653f942c9572899cf9712fd2820 (patch)
treec9436820f864ab761a58cb5b6ce5dcd8db9c9bcf /scripts
parentd9fff6a0f984714afc050ad204329a18cbe74278 (diff)
fix script
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/get.sh4
-rw-r--r--scripts/register-completions.sh3
2 files changed, 4 insertions, 3 deletions
diff --git a/scripts/get.sh b/scripts/get.sh
index 2e4b0acea..7be3e63fd 100755
--- a/scripts/get.sh
+++ b/scripts/get.sh
@@ -175,8 +175,8 @@ install_profile()
{
if [ ! -d ~/.xmake ]; then mkdir ~/.xmake; fi
echo "export PATH=$prefix/bin:\$PATH" > ~/.xmake/profile
- if [ 'x__local__' = "x$branch" ] && [ -f './scripts/register-completions.sh']; then
- cat './scripts/register-completions.sh' >> ~/.xmake/profile
+ if [ -f "$projectdir/scripts/register-completions.sh" ]; then
+ cat "$projectdir/scripts/register-completions.sh" >> ~/.xmake/profile
else
remote_get_content "https://github.com/$mirror/xmake/raw/master/scripts/register-completions.sh" >> ~/.xmake/profile
fi
diff --git a/scripts/register-completions.sh b/scripts/register-completions.sh
index e95e4558f..2d2ea9e64 100644
--- a/scripts/register-completions.sh
+++ b/scripts/register-completions.sh
@@ -22,4 +22,5 @@ elif [[ "$SHELL" = */bash ]]; then
COMPREPLY=( $(compgen -W "$completions" -- "$word") )
}
complete -o default -o nospace -F _xmake_bash_complete xmake
-fi \ No newline at end of file
+fi
+