--- install.sh.orig 2008-08-12 23:45:42.000000000 +0200 +++ install.sh 2008-08-13 23:09:44.000000000 +0200 @@ -1720,6 +1720,18 @@ fi } +gentoo() +{ + if test -e /etc/gentoo-release ; then + for res in 16x16 22x22 32x32 48x48 ; do + mkdir -p ${D}/usr/share/icons/hicolor/${res}/apps + cp usr/share/icons/hicolor/${res}/apps/opera.png ${D}/usr/share/icons/hicolor/${res}/apps + done + mkdir -p ${D}/usr/share/applications + generate_desktop ${D}/usr/share/applications xdg + fi +} + huntdirs() { # $GNOME2PATH and $GNOMEPATH skipped (too few hits google site:gnome.org) @@ -1737,47 +1749,7 @@ xdg() { # http://standards.freedesktop.org - UDD='' - for BIN_DIR in `pathdirs`; do - test -x ${BIN_DIR}/update-desktop-database || continue - UDD=${BIN_DIR}/update-desktop-database; break - done - - # http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html - if test "$UDD"; then - 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 test -d ${ICON_DIR} && break - done - - if test ! -d ${ICON_DIR} - then warn "Could not find icon installation directory, icons not installed." - elif test ! -w ${ICON_DIR} - then warn "Directory \"${ICON_DIR}\" not writable by user \"${USER}\", icons not installed." - elif [ "`cd $ICON_DIR; /bin/pwd`" != "`cd usr/share/icons/hicolor; /bin/pwd`" ] - then - for RESOLUTION in 48x48 32x32 22x22 - do TO_DIR=${ICON_DIR}/${RESOLUTION}/apps - test -d $TO_DIR && test -w $TO_DIR && cp $cpv usr/share/icons/hicolor/$RESOLUTION/apps/opera.png $TO_DIR - done - fi - - for SHORTCUT_DIR in ${XDG_DATA_HOME}/applications /usr/local/share/applications /usr/share/applications - do test -d ${SHORTCUT_DIR} && break; - done - - if test ! -d ${SHORTCUT_DIR}; then warn "Could not find shortcut installation directory, desktop entry not installed."; return - elif test ! -w ${SHORTCUT_DIR}; then warn "Directory \"${SHORTCUT_DIR}\" not writable by user \"${USER}\", desktop entry not installed."; return - fi - generate_desktop ${SHORTCUT_DIR} xdg - ${UDD} - else - icons - gnome - kde 3 - kde 2 - kde1 - mandrake - fi + gentoo } echo test | sed -n -e 's/test//' || error 'sed'