desktop.eclass: domenu, remove unnecessary nested loop
authorMichał Górny <mgorny@gentoo.org>
Thu, 26 Jul 2018 11:12:08 +0000 (13:12 +0200)
committerMichał Górny <mgorny@gentoo.org>
Thu, 9 Aug 2018 14:08:39 +0000 (16:08 +0200)
eclass/desktop.eclass

index 8f2c6d55c2932e154c04d2fe39325642b5d571b2..08899b4a4607e57a7671c7dfc730ead8db835eb4 100644 (file)
@@ -244,15 +244,13 @@ domenu() {
        (
        # wrap the env here so that the 'insinto' call
        # doesn't corrupt the env of the caller
-       local i ret=0
+       local i ret=0
        insopts -m 0644
        insinto /usr/share/applications
        for i in "$@" ; do
                if [[ -d ${i} ]] ; then
-                       for j in "${i}"/*.desktop ; do
-                               doins "${j}"
-                               ((ret|=$?))
-                       done
+                       doins "${i}"/*.desktop
+                       ((ret|=$?))
                else
                        doins "${i}"
                        ((ret|=$?))