From: Randolph Sapp <[email protected]> It may be possible that someone submits a config without any templates. In this case we should not enter an infinite loop, nor should we try to copy empty strings.
Signed-off-by: Randolph Sapp <[email protected]> --- oe-layertool-setup.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/oe-layertool-setup.sh b/oe-layertool-setup.sh index cd6d04e..979390f 100755 --- a/oe-layertool-setup.sh +++ b/oe-layertool-setup.sh @@ -658,7 +658,7 @@ get_oecorelayerconf() { done="n" - while [ "$done" != "y" ] + while [ "$done" != "y" ] && [ -n "$confs" ] do cat << EOM @@ -713,7 +713,7 @@ get_oecorelocalconf() { done="n" - while [ "$done" != "y" ] + while [ "$done" != "y" ] && [ -n "$confs" ] do cat << EOM @@ -765,7 +765,10 @@ NOTE: Any additional entries to this file will be lost if the $0 EOM # First copy the template file - cp -f "$OECORELAYERCONFPATH" "$confdir/bblayers.conf" + if [ -n "$OECORELAYERCONFPATH" ] + then + cp -f "$OECORELAYERCONFPATH" "$confdir/bblayers.conf" + fi # Now add the layers we have configured to the BBLAYERS variable cat >> "$confdir/bblayers.conf" << EOM @@ -806,7 +809,10 @@ EOM fi # First copy the template file - cp -f "$OECORELOCALCONFPATH" "$confdir/local.conf" + if [ -n "$OECORELOCALCONFPATH" ] + then + cp -f "$OECORELOCALCONFPATH" "$confdir/local.conf" + fi # If command line option was not set use the old dldir if [ -z "$dldir" ] -- 2.52.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#17090): https://lists.yoctoproject.org/g/meta-arago/message/17090 Mute This Topic: https://lists.yoctoproject.org/mt/117662932/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
