All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] guile: fix a bashism
@ 2017-02-24 11:57 liu.ming50
  0 siblings, 0 replies; only message in thread
From: liu.ming50 @ 2017-02-24 11:57 UTC (permalink / raw)
  To: openembedded-core; +Cc: Ming Liu

From: Ming Liu <peter.x.liu@external.atlascopco.com>

A following flaw was detected by verify-bashisms script:
......
meta/recipes-devtools/guile/guile_2.0.13.bb
possible bashism in guile_cross_config line 94 ($'...' should be "$(printf '...')"):

   echo '#!'`which ${BUILD_SYS}-guile`$' \\\n--no-auto-compile -e main -s\n!#\n(define %guile-build-info '\'\( \
       > ${B}/guile-config.cross
......

Fixed by removing $'...' from echo command, using a printf instead.

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
---
 meta/recipes-devtools/guile/guile_2.0.13.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/guile/guile_2.0.13.bb b/meta/recipes-devtools/guile/guile_2.0.13.bb
index c29e752..bb73dcf 100644
--- a/meta/recipes-devtools/guile/guile_2.0.13.bb
+++ b/meta/recipes-devtools/guile/guile_2.0.13.bb
@@ -90,7 +90,7 @@ guile_cross_config() {
 	then
 	        # Create guile-config returning target values instead of native values
 	        install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}
-        	echo '#!'`which ${BUILD_SYS}-guile`$' \\\n--no-auto-compile -e main -s\n!#\n(define %guile-build-info '\'\( \
+        	printf '#!%s \\\n--no-auto-compile -e main -s\n!#\n(define %%guile-build-info %s(\n' $(which ${BUILD_SYS}-guile) "'" \
 			> ${B}/guile-config.cross
 	        sed -n -e 's:^[ \t]*{[ \t]*":  (:' \
 			-e 's:",[ \t]*": . ":' \
-- 
1.9.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-02-24 11:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-24 11:57 [PATCH] guile: fix a bashism liu.ming50

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.