wireshark: Fix do_compile error

If there is no mate_grammar.c, it will cause exit code 1 by "test -e" as following:

WARNING: exit code 1 from a shell command.

So use "if" instead of "test"

Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Liu Yiding 2026-02-06 16:12:29 +08:00 committed by Khem Raj
parent 8837d163ab
commit 9209caae62
No known key found for this signature in database
GPG Key ID: BB053355919D3314

View File

@ -71,8 +71,9 @@ do_compile:append:class-target() {
sed -i -e "s:** source file.*::g" ${B}/wiretap/busmaster_parser.c
sed -i -e "s:** source file.*::g" ${B}/epan/protobuf_lang_parser.c
sed -i -e "s:** source file.*::g" ${B}/epan/dfilter/grammar.c
test -e ${B}/plugins/epan/mate/mate_grammar.c && \
sed -i -e "s:** source file.*::g" ${B}/plugins/epan/mate/mate_grammar.c
if [ -f "${B}/plugins/epan/mate/mate_grammar.c" ]; then
sed -i -e 's:** source file.*::g' "${B}/plugins/epan/mate/mate_grammar.c"
fi
}
do_install:append:class-native() {