Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 137357
Collapse All | Expand All

(-)install.sh (-39 / +2 lines)
Lines 1784-1828 Link Here
1784
}
1784
}
1785
1785
1786
xdg()
1786
xdg()
1787
{   # http://standards.freedesktop.org
1787
{
1788
    UDD=''
1788
	/bin/true
1789
    for BIN_DIR in `pathdirs`; do
1790
	test -x ${BIN_DIR}/update-desktop-database || continue
1791
	UDD=${BIN_DIR}/update-desktop-database; break
1792
    done
1793
1794
    # http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
1795
    if test "$UDD"; then
1796
	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; do
1797
	    test -d ${ICON_DIR} && break
1798
	done
1799
1800
	if   test ! -d ${ICON_DIR}; then echo "Could not find icon installation directory, icons not installed." >&2
1801
	elif test ! -w ${ICON_DIR}; then echo "Directory \"${ICON_DIR}\" not writable by user \"${USER}\", icons not installed." >&2
1802
	else
1803
	    for RESOLUTION in 48x48 32x32 22x22; do
1804
		TO_DIR=${ICON_DIR}/${RESOLUTION}/apps
1805
		test -d ${TO_DIR} && test -w ${TO_DIR} && cp $cpv $share_dir/images/opera_${RESOLUTION}.png ${TO_DIR}/opera.png
1806
	    done
1807
	fi
1808
1809
	for SHORTCUT_DIR in ${XDG_DATA_HOME}/applications /usr/local/share/applications /usr/share/applications; do
1810
	    test -d ${SHORTCUT_DIR} && break;
1811
	done
1812
1813
	if   test ! -d ${SHORTCUT_DIR}; then echo "Could not find shortcut installation directory, desktop entry not installed." >&2; return
1814
	elif test ! -w ${SHORTCUT_DIR}; then echo "Directory \"${SHORTCUT_DIR}\" not writable by user \"${USER}\", desktop entry not installed." >&2; return
1815
	fi
1816
	generate_desktop ${SHORTCUT_DIR} xdg
1817
	${UDD}
1818
    else
1819
	icons
1820
	gnome
1821
	kde 3
1822
	kde 2
1823
	kde1
1824
	mandrake
1825
    fi
1826
}
1789
}
1827
1790
1828
echo test | sed -n -e 's/test//' || error 'sed'
1791
echo test | sed -n -e 's/test//' || error 'sed'

Return to bug 137357