mirror of
https://github.com/HEYAHONG/HEnvBox.git
synced 2025-05-09 03:41:20 +08:00
[Linux] 添加对HEnvBox工具优先级设置,允许将HEnvBox工具放在PATH最后
This commit is contained in:
parent
daaa51dea9
commit
1b3497e06e
13
config.sh
13
config.sh
@ -82,12 +82,12 @@ then
|
||||
export HENVBOX_LOCAL_BINDIR_PATH_UNIX=${HENVBOX_LOCAL_BINDIR_PATH}
|
||||
|
||||
#设置PATH变量
|
||||
export PATH=${HENVBOX_LOCAL_BINDIR_PATH_UNIX}:$PATH
|
||||
export PATH=${PATH}:${HENVBOX_LOCAL_BINDIR_PATH_UNIX}
|
||||
|
||||
#导入local目录下的其它软件(如ct-ng编译的交叉编译工具链)
|
||||
for bin in `find ${HENVBOX_LOCAL_ROOT_PATH_UNIX} -mindepth 2 -maxdepth 2 -type d -name bin 2> /dev/null`
|
||||
do
|
||||
export PATH=${bin}:$PATH
|
||||
export PATH=${PATH}:${bin}
|
||||
done
|
||||
|
||||
#导入tools中的配置脚本
|
||||
@ -95,6 +95,15 @@ then
|
||||
then
|
||||
. "${HENVBOX_ROOT_PATH}/tools/${HENVBOX_TYPE}/config.sh"
|
||||
fi
|
||||
|
||||
if [ "${CONFIG_HENVBOX_TOOLS_PATH_PRIORITY_HIGH}" = "y" ]
|
||||
then
|
||||
export PATH=${HENVBOX_LOCAL_BINDIR_PATH_UNIX}:${PATH}
|
||||
for bin in `find ${HENVBOX_LOCAL_ROOT_PATH_UNIX} -mindepth 2 -maxdepth 2 -type d -name bin 2> /dev/null`
|
||||
do
|
||||
export PATH=${bin}:$PATH
|
||||
done
|
||||
fi
|
||||
else
|
||||
echo 无法完成HEnvBox配置!
|
||||
fi
|
||||
|
@ -9,4 +9,9 @@ if HENVBOX_USE_KCONFIG
|
||||
#导入EnvCheck的Kconfig配置
|
||||
source "../EnvCheck/Kconfig"
|
||||
|
||||
|
||||
config HENVBOX_TOOLS_PATH_PRIORITY_HIGH
|
||||
bool "high priority of HEnvBox tools"
|
||||
default n
|
||||
|
||||
endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user