From c98080e93f0005d3d4f00a22df8633afe2051c85 Mon Sep 17 00:00:00 2001 From: wanzzhehe Date: Wed, 15 May 2024 15:13:50 +0800 Subject: Fix repeat add XMAKE_ROOTDIR to PATH in Linux --- scripts/get.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/get.sh b/scripts/get.sh index 7cfe5223d..f88e9ce7b 100755 --- a/scripts/get.sh +++ b/scripts/get.sh @@ -237,7 +237,7 @@ fi # install_profile() { export XMAKE_ROOTDIR="$prefix/bin" - export PATH="$XMAKE_ROOTDIR:$PATH" + [[ "$PATH" =~ (^|:)"$XMAKE_ROOTDIR"(:|$) ]] && export PATH="$XMAKE_ROOTDIR:$PATH" xmake --version xmake update --integrate } -- cgit v1.3.1