All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Liu <net147@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [meta-oe][PATCH] p7zip: do not hardcode path in native wrapper script
Date: Fri, 23 Sep 2016 12:39:24 +1000	[thread overview]
Message-ID: <20160923023924.29771-1-net147@gmail.com> (raw)

Signed-off-by: Jonathan Liu <net147@gmail.com>
---
 meta-oe/recipes-extended/p7zip/p7zip_16.02.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb b/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb
index 9f87e9f..fdd51db 100644
--- a/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb
+++ b/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb
@@ -29,8 +29,10 @@ do_install_class-native() {
 
     # Create a shell script wrapper to execute next to 7z.so
     mv ${D}${bindir}/7z ${D}${bindir}/7z.bin
-    echo "#! /bin/sh" > ${D}${bindir}/7z
-    echo "exec ${D}${bindir}/7z.bin \"\$@\"" >> ${D}${bindir}/7z
+    cat > ${D}${bindir}/7z << 'EOF'
+#!/bin/sh
+exec "$(dirname "$0")"/7z.bin "$@"
+EOF
     chmod 0755 ${D}${bindir}/7z
 }
 
-- 
2.10.0



                 reply	other threads:[~2016-09-23  2:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160923023924.29771-1-net147@gmail.com \
    --to=net147@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.