Openembedded Core Discussions
 help / color / mirror / Atom feed
* what shell programming constructs can we count on in .bbclass files?
@ 2017-03-15 10:44 Robert P. J. Day
  2017-03-15 11:05 ` Burton, Ross
  0 siblings, 1 reply; 5+ messages in thread
From: Robert P. J. Day @ 2017-03-15 10:44 UTC (permalink / raw)
  To: OE Core mailing list


  what shell (or level of POSIX compatibility) does one assume for
writing shell functions in .bbclass files?

  i'm looking at kernel-fitimage.bbclass and i see this:

  #
  # Step 7: Sign the image and add public key to U-Boot dtb
  #
  if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then

surely we don't still need to use that ugly "x" prefix hack for string
comparisons, do we?

  a bit further down:

  do_assemble_fitimage_initramfs() {
        if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage" && \
                test -n "${INITRAMFS_IMAGE}" ; then

would it not be equivalent to write that second test as:

  [ -n "${INITRAMFS_IMAGE}"]

and so on. what are we allowed to count on?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-03-15 14:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-15 10:44 what shell programming constructs can we count on in .bbclass files? Robert P. J. Day
2017-03-15 11:05 ` Burton, Ross
2017-03-15 12:40   ` Patrick Ohly
2017-03-15 13:34     ` Robert P. J. Day
2017-03-15 14:48     ` Burton, Ross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox