Skip to contentSkip to conversation

grep: fix install if bindir == base_bindir

PATCH New Wes Lindauer 1 participant 1 message Nov 14, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 grep: fix install if bindir == base_bindir

This same fix was made to the grep recipe in poky at hash 5f137933c05646dee685d7846cba875ae74064cd. Not everyone gets the luxury of using GPLv3 code, so the same fix needs to be applied to the GPLv2 version.

---
 recipes-extended/grep/grep_2.5.1a.bb | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
recipes-extended/grep/grep_2.5.1a.bb +7 -5
index 97ca768..b331fee 100644
@@ -38,11 +38,13 @@ do_configure_prepend () {
 
 do_install () {
 	autotools_do_install
-	install -d ${D}${base_bindir}
-	mv ${D}${bindir}/grep ${D}${base_bindir}/grep
-	mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep
-	mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep
-	rmdir ${D}${bindir}/
+        if [ "${base_bindir}" != "${bindir}" ]; then
+        	install -d ${D}${base_bindir}
+	        mv ${D}${bindir}/grep ${D}${base_bindir}/grep
+	        mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep
+	        mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep
+	        rmdir ${D}${bindir}/
+        fi
 }
 
 inherit update-alternatives
Signature · 1 line
2.14.5