mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-04-16 23:38:54 +00:00
scripts/crosstool-ng: Change overide bin dir
Change the overide bin dir so it can be used by companion tools Signed-off-by: Richard Strand <richard.strand@icomera.com> [yann.morin.1998@anciens.enib.fr: more generic overide tools dir] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
This commit is contained in:
parent
a2164e86c5
commit
72e623bbc7
@ -77,17 +77,17 @@ CT_TestOrAbort "The CONFIG_SHELL '${CT_CONFIG_SHELL}' (${CT_SHELL}) is not valid
|
||||
# Contains symlinks to the tools found by ./configure
|
||||
# Note: CT_DoLog and CT_DoExecLog do not use any of those tool, so
|
||||
# they can be safely used
|
||||
CT_BIN_OVERIDE_DIR="${CT_WORK_DIR}/bin"
|
||||
CT_DoLog DEBUG "Creating bin-overide for tools in '${CT_BIN_OVERIDE_DIR}'"
|
||||
CT_DoExecLog DEBUG mkdir -p "${CT_BIN_OVERIDE_DIR}"
|
||||
CT_TOOLS_OVERIDE_DIR="${CT_WORK_DIR}/tools"
|
||||
CT_DoLog DEBUG "Creating bin-overide for tools in '${CT_TOOLS_OVERIDE_DIR}'"
|
||||
CT_DoExecLog DEBUG mkdir -p "${CT_TOOLS_OVERIDE_DIR}/bin"
|
||||
cat "${CT_LIB_DIR}/paths.mk" |while read trash line; do
|
||||
tool="${line%%=*}"
|
||||
path="${line#*=}"
|
||||
CT_DoLog DEBUG "Creating script-override for '${tool}' -> '${path}'"
|
||||
printf "#${BANG}${CT_SHELL}\nexec '${path}' \"\${@}\"\n" >"${CT_BIN_OVERIDE_DIR}/${tool}"
|
||||
CT_DoExecLog ALL chmod 700 "${CT_BIN_OVERIDE_DIR}/${tool}"
|
||||
printf "#${BANG}${CT_SHELL}\nexec '${path}' \"\${@}\"\n" >"${CT_TOOLS_OVERIDE_DIR}/bin/${tool}"
|
||||
CT_DoExecLog ALL chmod 700 "${CT_TOOLS_OVERIDE_DIR}/bin/${tool}"
|
||||
done
|
||||
export PATH="${CT_BIN_OVERIDE_DIR}:${PATH}"
|
||||
export PATH="${CT_TOOLS_OVERIDE_DIR}/bin:${PATH}"
|
||||
|
||||
# Start date. Can't be done until we know the locale
|
||||
# Also requires the bin-override tools
|
||||
|
Loading…
x
Reference in New Issue
Block a user