diff mbox series

dev-manual/new-recipe.rst: update code snippet from sed recipe

Message ID 6766a20a-e028-7803-2ffe-645f669fd2bc@crashcourse.ca
State New
Headers show
Series dev-manual/new-recipe.rst: update code snippet from sed recipe | expand

Commit Message

Robert P. J. Day Oct. 31, 2025, 1:29 p.m. UTC
Update the snippet from OE-Core's sed recipe; might as well
keep up to date.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>

---
diff mbox series

Patch

diff --git a/documentation/dev-manual/new-recipe.rst b/documentation/dev-manual/new-recipe.rst
index aa4fb97a4..30cc27248 100644
--- a/documentation/dev-manual/new-recipe.rst
+++ b/documentation/dev-manual/new-recipe.rst
@@ -1461,8 +1461,10 @@  chapter of the BitBake User Manual.
       do_install () {
           autotools_do_install
           install -d ${D}${base_bindir}
-          mv ${D}${bindir}/sed ${D}${base_bindir}/sed
-          rmdir ${D}${bindir}/
+          if [ ! ${D}${bindir} -ef ${D}${base_bindir} ]; then
+              mv ${D}${bindir}/sed ${D}${base_bindir}/sed
+              rmdir ${D}${bindir}/
+          fi
       }

    It is