Skip to contentSkip to conversation

Fix non-standard shell usage

PATCH In review Andrew Davis 3 participants 3 messages Apr 26, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix non-standard shell usage

Remove some Bashisms that prevent prevent this script from working on stock Ubuntu (with Dash default interpreter).

---
 oe-layertool-setup.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
oe-layertool-setup.sh +2 -2
index f171f94..e05737b 100755
@@ -780,7 +780,7 @@ print_image_names() {
     for FOLDER in ${FOLDERS}
     do
         RECO=""
-        if [ "${FOLDER}" == "meta-arago" ]; then
+        if [ "${FOLDER}" = "meta-arago" ]; then
             RECO="[recommended]"
         fi
         echo "From ${FOLDER}${RECO}:"
@@ -796,7 +796,7 @@ print_image_names() {
                     if [ -z "${summary}" ]; then
                         summary="No Summary available"
                     fi
-                    echo -e "\t${name}: ${summary}"
+                    echo "    ${name}: ${summary}"
                 done
             fi
         done
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Andrew F. Davis via lists.yoctoproject.org

Remove some Bashisms that prevent prevent this script from working on stock Ubuntu (with Dash default interpreter).

Quoted 28 lines
---
 oe-layertool-setup.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
oe-layertool-setup.sh +2 -2
index f171f94..e05737b 100755
@@ -780,7 +780,7 @@ print_image_names() {
     for FOLDER in ${FOLDERS}
     do
         RECO=""
-        if [ "${FOLDER}" == "meta-arago" ]; then
+        if [ "${FOLDER}" = "meta-arago" ]; then
             RECO="[recommended]"
         fi
         echo "From ${FOLDER}${RECO}:"
@@ -796,7 +796,7 @@ print_image_names() {
                     if [ -z "${summary}" ]; then
                         summary="No Summary available"
                     fi
-                    echo -e "\t${name}: ${summary}"
+                    echo "    ${name}: ${summary}"
                 done
             fi
         done
Signature · 1 line
2.17.1
#2 lore raw

Patch applied to master.

Quoted 37 lines · Denys Dmytriyenko
Quoted 4 lines · Andrew F. Davis via lists.yoctoproject.org

Remove some Bashisms that prevent prevent this script from working on stock Ubuntu (with Dash default interpreter).

Quoted 28 lines
---
  oe-layertool-setup.sh | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
oe-layertool-setup.sh +2 -2
index f171f94..e05737b 100755
@@ -780,7 +780,7 @@ print_image_names() {
      for FOLDER in ${FOLDERS}
      do
          RECO=""
-        if [ "${FOLDER}" == "meta-arago" ]; then
+        if [ "${FOLDER}" = "meta-arago" ]; then
              RECO="[recommended]"
          fi
          echo "From ${FOLDER}${RECO}:"
@@ -796,7 +796,7 @@ print_image_names() {
                      if [ -z "${summary}" ]; then
                          summary="No Summary available"
                      fi
-                    echo -e "\t${name}: ${summary}"
+                    echo "    ${name}: ${summary}"
                  done
              fi
          done
Signature · 1 line
2.17.1
Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS