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
