summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-04-16 07:05:45 +0000
committerMike Frysinger <vapier@gentoo.org>2005-04-16 07:05:45 +0000
commitae5a86d16d98a970bc4fa4afb3b320f0fa02f159 (patch)
treec92e05ab94948ada16fd582a514ecd25475121ec /eclass/eutils.eclass
parentAdd fixes from upstream to support more bash code and more cp options #88841. (diff)
downloadgentoo-2-ae5a86d16d98a970bc4fa4afb3b320f0fa02f159.tar.gz
gentoo-2-ae5a86d16d98a970bc4fa4afb3b320f0fa02f159.tar.bz2
gentoo-2-ae5a86d16d98a970bc4fa4afb3b320f0fa02f159.zip
add newicon / newmenu #88983
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r--eclass/eutils.eclass61
1 files changed, 28 insertions, 33 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index 04f25f650e78..64cdee7d5ec7 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.166 2005/04/15 22:01:42 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.167 2005/04/16 07:05:45 vapier Exp $
#
# Author: Martin Schlemmer <azarah@gentoo.org>
#
@@ -1011,13 +1011,12 @@ Categories=Application;${type};" > "${desktop}"
# command: Name of the Window Manager
make_session_desktop() {
+ [[ -z $1 ]] && eerror "make_session_desktop: You must specify the title" && return 1
+ [[ -z $2 ]] && eerror "make_session_desktop: You must specify the command" && return 1
- [ -z "$1" ] && eerror "make_session_desktop: You must specify the title" && return 1
- [ -z "$2" ] && eerror "make_session_desktop: You must specify the command" && return 1
-
- local title="${1}"
- local command="${2}"
- local desktop="${T}/${wm}.desktop"
+ local title=$1
+ local command=$2
+ local desktop=${T}/${wm}.desktop
echo "[Desktop Entry]
Encoding=UTF-8
@@ -1029,47 +1028,43 @@ Type=Application" > "${desktop}"
insinto /usr/share/xsessions
doins "${desktop}"
-
- return 0
}
domenu() {
- local i
- local j
+ local i j
insinto /usr/share/applications
- for i in ${@}
- do
- if [ -f "${i}" ];
- then
- doins ${i}
- elif [ -d "${i}" ];
- then
- for j in ${i}/*.desktop
- do
- doins ${j}
+ for i in "$@" ; do
+ if [[ -f ${i} ]] ; then
+ doins "${i}"
+ elif [[ -d ${i} ]] ; then
+ for j in "${i}"/*.desktop ; do
+ doins "${j}"
done
fi
done
}
+newmenu() {
+ insinto /usr/share/applications
+ newins "$1" "$2"
+}
doicon() {
- local i
- local j
+ local i j
insinto /usr/share/pixmaps
- for i in ${@}
- do
- if [ -f "${i}" ];
- then
- doins ${i}
- elif [ -d "${i}" ];
- then
- for j in ${i}/*.png
- do
- doins ${j}
+ for i in "$@" ; do
+ if [[ -f ${i} ]] ; then
+ doins "${i}"
+ elif [[ -d ${i} ]] ; then
+ for j in "${i}"/*.png ; do
+ doins "${j}"
done
fi
done
}
+newicon() {
+ insinto /usr/share/pixmaps
+ newins "$1" "$2"
+}
##############################################################
# END: Handle .desktop files and menu entries #