summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-07-26 13:12:08 +0200
committerMichał Górny <mgorny@gentoo.org>2018-08-09 16:08:39 +0200
commitf6fe42c17ba4a55ea5f13a3bb9c39cc85c790483 (patch)
tree7d6ea1c322ee5e99686614ccdc634b6490aa8498 /eclass/desktop.eclass
parentdesktop.eclass: domenu, fix potential overflow in exit status (diff)
downloadgentoo-f6fe42c17ba4a55ea5f13a3bb9c39cc85c790483.tar.gz
gentoo-f6fe42c17ba4a55ea5f13a3bb9c39cc85c790483.tar.bz2
gentoo-f6fe42c17ba4a55ea5f13a3bb9c39cc85c790483.zip
desktop.eclass: domenu, remove unnecessary nested loop
Diffstat (limited to 'eclass/desktop.eclass')
-rw-r--r--eclass/desktop.eclass8
1 files changed, 3 insertions, 5 deletions
diff --git a/eclass/desktop.eclass b/eclass/desktop.eclass
index 8f2c6d55c29..08899b4a460 100644
--- a/eclass/desktop.eclass
+++ b/eclass/desktop.eclass
@@ -244,15 +244,13 @@ domenu() {
(
# wrap the env here so that the 'insinto' call
# doesn't corrupt the env of the caller
- local i j 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|=$?))