mkproject: sanitize PATH environment variable
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
700dbe38d6
commit
3f9c3cc5e5
|
|
@ -66,6 +66,9 @@ do_mkproject() {
|
||||||
source ${SCRIPTPATH}/sources/poky/oe-init-build-env .
|
source ${SCRIPTPATH}/sources/poky/oe-init-build-env .
|
||||||
unset TEMPLATECONF
|
unset TEMPLATECONF
|
||||||
|
|
||||||
|
# Remove possible duplicated entries in PATH (due to re-sourcing the script)
|
||||||
|
export PATH=$(printf ${PATH} | awk -v RS=: '{if (!arr[$0]++) {printf("%s%s", !ln++ ? "" : ":", $0) }}')
|
||||||
|
|
||||||
# Customize project if just created
|
# Customize project if just created
|
||||||
if [ -z "${OLD_PROJECT}" ]; then
|
if [ -z "${OLD_PROJECT}" ]; then
|
||||||
NCPU="$(grep -c processor /proc/cpuinfo)"
|
NCPU="$(grep -c processor /proc/cpuinfo)"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue