mkproject.sh: add meta-digi's scripts directory to the PATH
This will allow to create user helper scripts that are available (in the PATH) when building DEY projects. Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
f397ee2289
commit
0966b3d04e
|
|
@ -35,8 +35,15 @@ MKP_SETUP_ENVIRONMENT='#!/bin/bash
|
||||||
if [ "${BASH_SOURCE}" = "${0}" ]; then
|
if [ "${BASH_SOURCE}" = "${0}" ]; then
|
||||||
printf "\\n[ERROR]: This script needs to be sourced\\n\\n"
|
printf "\\n[ERROR]: This script needs to be sourced\\n\\n"
|
||||||
else
|
else
|
||||||
|
DEY_INSTALLDIR="%s"
|
||||||
cd $(dirname ${BASH_SOURCE})
|
cd $(dirname ${BASH_SOURCE})
|
||||||
. %s/sources/poky/oe-init-build-env .
|
. ${DEY_INSTALLDIR}/sources/poky/oe-init-build-env .
|
||||||
|
|
||||||
|
# Add our own scripts directory to the PATH
|
||||||
|
PATH="$(echo $PATH | sed -e "s,:\?${DEY_INSTALLDIR}/sources/meta-digi/scripts,,g;s,^:,,g")"
|
||||||
|
export PATH="${DEY_INSTALLDIR}/sources/meta-digi/scripts:$PATH"
|
||||||
|
|
||||||
|
unset DEY_INSTALLDIR
|
||||||
fi
|
fi
|
||||||
'
|
'
|
||||||
|
|
||||||
|
|
@ -123,6 +130,10 @@ do_mkproject() {
|
||||||
source ${MKP_SCRIPTPATH}/sources/poky/oe-init-build-env .
|
source ${MKP_SCRIPTPATH}/sources/poky/oe-init-build-env .
|
||||||
unset TEMPLATECONF
|
unset TEMPLATECONF
|
||||||
|
|
||||||
|
# Add our own scripts directory to the PATH
|
||||||
|
PATH="$(echo $PATH | sed -e "s,:\?${MKP_SCRIPTPATH}/sources/meta-digi/scripts,,g;s,^:,,g")"
|
||||||
|
export PATH="${MKP_SCRIPTPATH}/sources/meta-digi/scripts:$PATH"
|
||||||
|
|
||||||
# New project
|
# New project
|
||||||
if [ -z "${MKP_OLD_PROJECT}" ]; then
|
if [ -z "${MKP_OLD_PROJECT}" ]; then
|
||||||
# Customize project
|
# Customize project
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue