File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ cd "$THIS_DIR"
2525function do_compile_a_lib()
2626{
2727 local lib_config=" $1 "
28+ lib_config=$( make_absolute_path " $lib_config " )
2829 [[ ! -f " $lib_config " ]] && (echo " ❌$lib_config config not exist, compile will stop." ; exit 1; )
2930
3031 echo " ===[$MR_CMD $lib ]===================="
@@ -49,7 +50,7 @@ function compile_libs()
4950 # 循环编译所有的库
5051 for lib in $MR_VENDOR_LIBS
5152 do
52- do_compile_a_lib " $MR_SHELL_CONFIGS_DIR /libs/${lib} .sh"
53+ do_compile_a_lib " configs /libs/${lib} .sh"
5354 done
5455
5556 if [[ -n " $LIB_CONFIG_PATH " ]]; then
Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ function apply_patches() {
113113
114114 local patch_base_dir=$( dirname " $MR_LIB_CONFIG_PATH " )
115115 local patch_dir=" ${patch_base_dir} /$PATCH_DIR "
116+ patch_dir=$( make_absolute_path " $patch_dir " )
116117 local patch_dirs=(
117118 " $patch_dir "
118119 " ${patch_dir} -${MR_PLAT} "
Original file line number Diff line number Diff line change @@ -46,7 +46,9 @@ function parse_args() {
4646
4747function do_init_a_lib()
4848{
49- local lib_config=" $1 "
49+ local lib_config=" $1 "
50+ lib_config=$( make_absolute_path " $lib_config " )
51+ [[ ! -f " $lib_config " ]] && (echo " ❌$lib_config config not exist,init will stop." ; exit 1; )
5052 echo " ===[init $lib_config ]===================="
5153 [[ ! -f " $lib_config " ]] && (echo " ❌$lib_config config not exist,init will stop." ; exit 1; )
5254 source " $lib_config "
@@ -62,7 +64,7 @@ function main() {
6264
6365 for lib in $MR_VENDOR_LIBS
6466 do
65- do_init_a_lib " $MR_SHELL_CONFIGS_DIR /libs/${lib} .sh"
67+ do_init_a_lib " configs /libs/${lib} .sh"
6668 done
6769
6870 if [[ -n " $LIB_CONFIG_PATH " ]]; then
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ function parse_lib_config() {
5050function do_install_a_lib()
5151{
5252 local lib_config=" $1 "
53+ lib_config=$( make_absolute_path " $lib_config " )
5354 [[ ! -f " $lib_config " ]] && (echo " ❌$lib_config config not exist,install will stop." ; exit 1; )
5455
5556 echo " ===[install $lib_config ]===================="
@@ -68,7 +69,7 @@ function install_libs()
6869 # 循环安装所有的库
6970 for lib in $MR_VENDOR_LIBS
7071 do
71- do_install_a_lib " $MR_SHELL_CONFIGS_DIR /libs/${lib} .sh"
72+ do_install_a_lib " configs /libs/${lib} .sh"
7273 done
7374
7475 if [[ -n " $LIB_CONFIG_PATH " ]]; then
Original file line number Diff line number Diff line change @@ -121,8 +121,19 @@ function echo_env()
121121 fi
122122}
123123
124+ function make_absolute_path()
125+ {
126+ local p=" $1 "
127+ if [[ $p == /* ]]; then
128+ echo " $( cd " $( dirname " $p " ) " && pwd) /$( basename " $p " ) "
129+ else
130+ echo " $( cd " $( dirname " $MR_SHELL_ROOT_DIR /$p " ) " && pwd) /$( basename " $p " ) "
131+ fi
132+ }
133+
124134export -f env_assert
125135export -f echo_env
136+ export -f make_absolute_path
126137
127138function help()
128139{
You can’t perform that action at this time.
0 commit comments