|
Lines 1720-1725
Link Here
|
| 1720 |
fi |
1720 |
fi |
| 1721 |
} |
1721 |
} |
| 1722 |
|
1722 |
|
|
|
1723 |
gentoo() |
| 1724 |
{ |
| 1725 |
if test -e /etc/gentoo-release ; then |
| 1726 |
for res in 16x16 22x22 32x32 48x48 ; do |
| 1727 |
mkdir -p /usr/share/icons/hicolor/${res}/apps |
| 1728 |
cp usr/share/icons/hicolor/${res}/apps/opera.png /usr/share/icons/hicolor/${res}/apps |
| 1729 |
done |
| 1730 |
mkdir -p ${D}/usr/share/applications |
| 1731 |
generate_desktop ${D}/usr/share/applications xdg |
| 1732 |
fi |
| 1733 |
} |
| 1734 |
|
| 1723 |
huntdirs() |
1735 |
huntdirs() |
| 1724 |
{ |
1736 |
{ |
| 1725 |
# $GNOME2PATH and $GNOMEPATH skipped (too few hits google site:gnome.org) |
1737 |
# $GNOME2PATH and $GNOMEPATH skipped (too few hits google site:gnome.org) |
|
Lines 1737-1783
Link Here
|
| 1737 |
|
1749 |
|
| 1738 |
xdg() |
1750 |
xdg() |
| 1739 |
{ # http://standards.freedesktop.org |
1751 |
{ # http://standards.freedesktop.org |
| 1740 |
UDD='' |
1752 |
gentoo |
| 1741 |
for BIN_DIR in `pathdirs`; do |
|
|
| 1742 |
test -x ${BIN_DIR}/update-desktop-database || continue |
| 1743 |
UDD=${BIN_DIR}/update-desktop-database; break |
| 1744 |
done |
| 1745 |
|
| 1746 |
# http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html |
| 1747 |
if test "$UDD"; then |
| 1748 |
for ICON_DIR in `echo ${XDG_DATA_DIRS}:/usr/local/share:/usr/share|tr : '\012'|sed -e '/^$/d;s:$:/icons/hicolor:'` /usr/share/pixmaps/hicolor |
| 1749 |
do test -d ${ICON_DIR} && break |
| 1750 |
done |
| 1751 |
|
| 1752 |
if test ! -d ${ICON_DIR} |
| 1753 |
then warn "Could not find icon installation directory, icons not installed." |
| 1754 |
elif test ! -w ${ICON_DIR} |
| 1755 |
then warn "Directory \"${ICON_DIR}\" not writable by user \"${USER}\", icons not installed." |
| 1756 |
elif [ "`cd $ICON_DIR; /bin/pwd`" != "`cd usr/share/icons/hicolor; /bin/pwd`" ] |
| 1757 |
then |
| 1758 |
for RESOLUTION in 48x48 32x32 22x22 |
| 1759 |
do TO_DIR=${ICON_DIR}/${RESOLUTION}/apps |
| 1760 |
test -d $TO_DIR && test -w $TO_DIR && cp $cpv usr/share/icons/hicolor/$RESOLUTION/apps/opera.png $TO_DIR |
| 1761 |
done |
| 1762 |
fi |
| 1763 |
|
| 1764 |
for SHORTCUT_DIR in ${XDG_DATA_HOME}/applications /usr/local/share/applications /usr/share/applications |
| 1765 |
do test -d ${SHORTCUT_DIR} && break; |
| 1766 |
done |
| 1767 |
|
| 1768 |
if test ! -d ${SHORTCUT_DIR}; then warn "Could not find shortcut installation directory, desktop entry not installed."; return |
| 1769 |
elif test ! -w ${SHORTCUT_DIR}; then warn "Directory \"${SHORTCUT_DIR}\" not writable by user \"${USER}\", desktop entry not installed."; return |
| 1770 |
fi |
| 1771 |
generate_desktop ${SHORTCUT_DIR} xdg |
| 1772 |
${UDD} |
| 1773 |
else |
| 1774 |
icons |
| 1775 |
gnome |
| 1776 |
kde 3 |
| 1777 |
kde 2 |
| 1778 |
kde1 |
| 1779 |
mandrake |
| 1780 |
fi |
| 1781 |
} |
1753 |
} |
| 1782 |
|
1754 |
|
| 1783 |
echo test | sed -n -e 's/test//' || error 'sed' |
1755 |
echo test | sed -n -e 's/test//' || error 'sed' |