mkproject: sanitize PATH environment variable

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2013-05-07 19:50:32 +02:00
parent 700dbe38d6
commit 3f9c3cc5e5
1 changed files with 3 additions and 0 deletions

View File

@ -66,6 +66,9 @@ do_mkproject() {
source ${SCRIPTPATH}/sources/poky/oe-init-build-env .
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
if [ -z "${OLD_PROJECT}" ]; then
NCPU="$(grep -c processor /proc/cpuinfo)"