summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacobo Aragunde Perez <jaragunde@igalia.com>2016-01-12 17:36:42 +0000
committerAlexander Larsson <alexl@redhat.com>2016-01-19 13:26:34 +0100
commit6f3b71997f5030353023722d26d2aa2c2c346d75 (patch)
tree1d185630262f0f679af84c43c77a45b49c11e0dd
parent4f89712a14cf936d2afa6e8abae4a02738196c14 (diff)
Fix "bad substitution" error for non-bash shells.1.2
In those systems where the sh command defaults to dash, the shell parameter expansion expressions will not work. Worked the script around to avoid the usage of these.
-rw-r--r--meta-freedesktop/classes/freedesktop-contents.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta-freedesktop/classes/freedesktop-contents.bbclass b/meta-freedesktop/classes/freedesktop-contents.bbclass
index 2e45d75..af826b5 100644
--- a/meta-freedesktop/classes/freedesktop-contents.bbclass
+++ b/meta-freedesktop/classes/freedesktop-contents.bbclass
@@ -211,7 +211,8 @@ EOF
prio=`sed -ne "1!p" $alt | sed -e "s/\(.*\) \(.*\)/\2 \1/g" | sort -nr | head -n 1 | sed 's/ [^ ]*$//'`
path=`grep "${prio}$" $alt | tail -n 1 | sed 's/ [^ ]*$//'`
path_basename=`basename $path`
- if [ "${path_basename/$name.}" != "$path_basename" ] ; then
+ package=`echo $path_basename | sed s/$name.//`
+ if [ "$name.$package" = "$path_basename" ] ; then
if [ -f "${IMAGE_ROOTFS}/$path" ] ; then
mv -f "${IMAGE_ROOTFS}/$path" "${IMAGE_ROOTFS}/$link"
fi