From e273de15d253d4dc1b904e4fa0da5fb1bbe57304 Mon Sep 17 00:00:00 2001 From: xq114 <1140735506@qq.com> Date: Tue, 24 Aug 2021 21:11:47 +0800 Subject: move PATH setting to toplevel --- scripts/get.sh | 3 ++- scripts/register-completions.sh | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/get.sh b/scripts/get.sh index 21814e45e..060ee4e20 100755 --- a/scripts/get.sh +++ b/scripts/get.sh @@ -227,7 +227,8 @@ write_profile() install_profile() { if [ ! -d ~/.xmake ]; then mkdir ~/.xmake; fi - echo "export XMAKE_ROOTDIR=$prefix/bin" > ~/.xmake/profile + echo "export XMAKE_ROOTDIR=\"$prefix/bin\"" > ~/.xmake/profile + echo "export PATH=\"${XMAKE_ROOTDIR}:$PATH\"" >> ~/.xmake/profile if [ -f "$projectdir/scripts/register-completions.sh" ]; then cat "$projectdir/scripts/register-completions.sh" >> ~/.xmake/profile else diff --git a/scripts/register-completions.sh b/scripts/register-completions.sh index c93cfb15e..e274605b2 100755 --- a/scripts/register-completions.sh +++ b/scripts/register-completions.sh @@ -1,8 +1,6 @@ # parameter completions for *nix shell -export PATH=${XMAKE_ROOTDIR}:$PATH - if [[ "$SHELL" = */zsh ]]; then # zsh parameter completion for xmake _xmake_zsh_complete() -- cgit v1.3.1