diff options
author | Abongwa Amahnui Bonalais <abongwabonalais@gmail.com> | 2022-04-05 11:47:05 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-04-05 22:23:40 +0100 |
commit | 13eda43533f0e7a9ee8e776ac0af1658d8580005 (patch) | |
tree | 1b1efbb144ff26d81873e20f1158ed84c4d84a0f | |
parent | 601befb6c76835b96e2bb42230a5b7fcdd28d7fc (diff) | |
download | poky-13eda43533f0e7a9ee8e776ac0af1658d8580005.tar.gz |
oe-init-build-env: add quotes around variables to prevent word splitting
Used shellcheck to add quotes to the variables. This is to make sure that
directories with names that have space between, such as
"Desktop/projects/test repo/poky" will not be considered as 2 separate
words. With this modification, running the command "source
oe-init-build-env" will not give the error "bash: oe-init-build-env: No
such file or directory"
(From OE-Core rev: b07a70fbf78f2beba639580e37dffbc0a73bc99f)
Signed-off-by: Abongwa Bonalais Amahnui <abongwabonalais@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | oe-init-build-env | 4 | ||||
-rwxr-xr-x | scripts/oe-setup-builddir | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/oe-init-build-env b/oe-init-build-env index 8c1bd54e57..38333ab858 100755 --- a/oe-init-build-env +++ b/oe-init-build-env | |||
@@ -42,8 +42,8 @@ fi | |||
42 | unset THIS_SCRIPT | 42 | unset THIS_SCRIPT |
43 | 43 | ||
44 | export OEROOT | 44 | export OEROOT |
45 | . $OEROOT/scripts/oe-buildenv-internal && | 45 | . "$OEROOT"/scripts/oe-buildenv-internal && |
46 | TEMPLATECONF="$TEMPLATECONF" $OEROOT/scripts/oe-setup-builddir || { | 46 | TEMPLATECONF="$TEMPLATECONF" "$OEROOT"/scripts/oe-setup-builddir || { |
47 | unset OEROOT | 47 | unset OEROOT |
48 | return 1 | 48 | return 1 |
49 | } | 49 | } |
diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir index d4ac074ad9..54048e62ec 100755 --- a/scripts/oe-setup-builddir +++ b/scripts/oe-setup-builddir | |||
@@ -42,7 +42,7 @@ if [ -f "$BUILDDIR/conf/templateconf.cfg" ]; then | |||
42 | TEMPLATECONF=$(cat "$BUILDDIR/conf/templateconf.cfg") | 42 | TEMPLATECONF=$(cat "$BUILDDIR/conf/templateconf.cfg") |
43 | fi | 43 | fi |
44 | 44 | ||
45 | . $OEROOT/.templateconf | 45 | . "$OEROOT"/.templateconf |
46 | 46 | ||
47 | if [ ! -f "$BUILDDIR/conf/templateconf.cfg" ]; then | 47 | if [ ! -f "$BUILDDIR/conf/templateconf.cfg" ]; then |
48 | echo "$TEMPLATECONF" >"$BUILDDIR/conf/templateconf.cfg" | 48 | echo "$TEMPLATECONF" >"$BUILDDIR/conf/templateconf.cfg" |
@@ -79,7 +79,7 @@ example, select a different MACHINE (target hardware). See conf/local.conf | |||
79 | for more information as common configuration options are commented. | 79 | for more information as common configuration options are commented. |
80 | 80 | ||
81 | EOM | 81 | EOM |
82 | cp -f $OECORELOCALCONF "$BUILDDIR/conf/local.conf" | 82 | cp -f "$OECORELOCALCONF" "$BUILDDIR/conf/local.conf" |
83 | SHOWYPDOC=yes | 83 | SHOWYPDOC=yes |
84 | fi | 84 | fi |
85 | 85 | ||
@@ -100,7 +100,7 @@ EOM | |||
100 | # to replace it for compatibility. | 100 | # to replace it for compatibility. |
101 | sed -e "s|##OEROOT##|$OEROOT|g" \ | 101 | sed -e "s|##OEROOT##|$OEROOT|g" \ |
102 | -e "s|##COREBASE##|$OEROOT|g" \ | 102 | -e "s|##COREBASE##|$OEROOT|g" \ |
103 | $OECORELAYERCONF > "$BUILDDIR/conf/bblayers.conf" | 103 | "$OECORELAYERCONF" > "$BUILDDIR/conf/bblayers.conf" |
104 | SHOWYPDOC=yes | 104 | SHOWYPDOC=yes |
105 | fi | 105 | fi |
106 | 106 | ||
@@ -125,5 +125,5 @@ fi | |||
125 | if [ -z "$OECORENOTESCONF" ]; then | 125 | if [ -z "$OECORENOTESCONF" ]; then |
126 | OECORENOTESCONF="$OEROOT/meta/conf/conf-notes.txt" | 126 | OECORENOTESCONF="$OEROOT/meta/conf/conf-notes.txt" |
127 | fi | 127 | fi |
128 | [ ! -r "$OECORENOTESCONF" ] || cat $OECORENOTESCONF | 128 | [ ! -r "$OECORENOTESCONF" ] || cat "$OECORENOTESCONF" |
129 | unset OECORENOTESCONF | 129 | unset OECORENOTESCONF |