1615f2f11SAndrew GeisslerSUMMARY = "Check that create_cmdline_shebang works" 2615f2f11SAndrew GeisslerLICENSE = "MIT" 3615f2f11SAndrew GeisslerLIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" 4615f2f11SAndrew GeisslerINHIBIT_DEFAULT_DEPS = "1" 5615f2f11SAndrew Geissler 6615f2f11SAndrew GeisslerSRC_URI += "file://test.awk" 7615f2f11SAndrew Geissler 8615f2f11SAndrew GeisslerEXCLUDE_FROM_WORLD = "1" 9615f2f11SAndrew Geisslerdo_install() { 10615f2f11SAndrew Geissler install -d ${D}${bindir} 11615f2f11SAndrew Geissler # was not able to make ownership preservation check 12*edff4923SAndrew Geissler install -m 0400 ${UNPACKDIR}/test.awk ${D}${bindir}/test 13615f2f11SAndrew Geissler 14615f2f11SAndrew Geissler perm_old="$(stat --format='%a' ${D}${bindir}/test)" 15615f2f11SAndrew Geissler sed -i -e 's|@AWK_BIN@|${bindir}/awk|g' ${D}${bindir}/test 16615f2f11SAndrew Geissler create_cmdline_shebang_wrapper ${D}${bindir}/test 17615f2f11SAndrew Geissler if [ $(${D}${bindir}/test) != "Don't Panic!" ]; then 18615f2f11SAndrew Geissler bbfatal "Wrapper is broken" 19615f2f11SAndrew Geissler else 20615f2f11SAndrew Geissler bbnote "Wrapper is good" 21615f2f11SAndrew Geissler fi 22615f2f11SAndrew Geissler 23615f2f11SAndrew Geissler perm_new="$(stat --format='%a' ${D}${bindir}/test.real)" 24615f2f11SAndrew Geissler 25615f2f11SAndrew Geissler if [ "$perm_new" != "$perm_old" ]; then 26615f2f11SAndrew Geissler bbfatal "Wrapper permissions for ${D}${bindir}/test.real not preserved. Found $perm_new but expected $perm_old" 27615f2f11SAndrew Geissler fi 28615f2f11SAndrew Geissler} 29615f2f11SAndrew Geissler 30615f2f11SAndrew GeisslerBBCLASSEXTEND = "native" 31