]> code.ossystems Code Review - openembedded-core.git/commit
openssl: fix bashism in c_rehash shell script
authorAndré Draszik <adraszik@tycoint.com>
Wed, 9 Nov 2016 14:48:53 +0000 (14:48 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 23 Nov 2016 11:02:25 +0000 (11:02 +0000)
commit0526524c74d4c9019fb014a2984119987f6ce9d3
treef7368e28844c994012b3b3a08d66202acdf164b9
parent04e17727a3d1b52f6f93078fd16c6c7c9ba2b0d4
openssl: fix bashism in c_rehash shell script

This script claims to be a /bin/sh script, but it uses
a bashism:

from checkbashisms:

possible bashism in meta/recipes-connectivity/openssl/openssl/openssl-c_rehash.sh line 151 (should be 'b = a'):
    if [ "x/" == "x$( echo ${FILE} | cut -c1 -)" ]

This causes build issues on systems that don't have
/bin/sh symlinked to bash:

Updating certificates in ${WORKDIR}/rootfs/etc/ssl/certs...
<builddir>/tmp/sysroots/x86_64-linux/usr/bin/c_rehash: 151: [: x/: unexpected operator
 ...

Fix this by using POSIX shell syntax for the comparison.

Signed-off-by: André Draszik <adraszik@tycoint.com>
Reviewed-by: Sylvain Lemieux <slemieux@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-connectivity/openssl/openssl/openssl-c_rehash.sh