mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 00:49:33 +02:00
utils: Add cmdline_shebang_wrapper util.
Useful to work around shebang relocation issues, where shebangs are too long or have arguments in them, thus preventing them from using the /usr/bin/env shebang. (From OE-Core rev: 6edc1fffcbe1405d8c309a75643d7d6cd9a92848) Signed-off-by: Paulo Neves <ptsneves@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
00458ee0f8
commit
eb997a6801
@@ -0,0 +1,21 @@
|
||||
SUMMARY = "Check that create_cmdline_shebang works"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
|
||||
SRC_URI += "file://test.awk"
|
||||
|
||||
EXCLUDE_FROM_WORLD = "1"
|
||||
do_install() {
|
||||
install -d ${D}${bindir}
|
||||
install -m 0755 ${WORKDIR}/test.awk ${D}${bindir}/test
|
||||
sed -i -e 's|@AWK_BIN@|${bindir}/awk|g' ${D}${bindir}/test
|
||||
create_cmdline_shebang_wrapper ${D}${bindir}/test
|
||||
if [ $(${D}${bindir}/test) != "Don't Panic!" ]; then
|
||||
bbfatal "Wrapper is broken"
|
||||
else
|
||||
bbnote "Wrapper is good"
|
||||
fi
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
2
meta-selftest/recipes-test/wrapper/files/test.awk
Normal file
2
meta-selftest/recipes-test/wrapper/files/test.awk
Normal file
@@ -0,0 +1,2 @@
|
||||
#! @AWK_BIN@ -f
|
||||
BEGIN { print "Don't Panic!" }
|
||||
Reference in New Issue
Block a user