diff options
| author | wanzzhehe <[email protected]> | 2024-05-15 15:13:50 +0800 |
|---|---|---|
| committer | wanzzhehe <[email protected]> | 2024-05-15 15:13:50 +0800 |
| commit | c98080e93f0005d3d4f00a22df8633afe2051c85 (patch) | |
| tree | f26233b76d5a9a6e9f43e6a65b19e00ae45bc4a9 /scripts | |
| parent | 304943e79b6e2c67d2c010f053d8cd2a42460ddd (diff) | |
Fix repeat add XMAKE_ROOTDIR to PATH in Linux
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/get.sh | 2 |
1 files changed, 1 insertions, 1 deletions
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 } |
