Added a check to ensure GAMES_DATADIR and GAMES_PREFIX_OPT aren't the same, and skip...
authorChris Gianelloni <wolf31o2@gentoo.org>
Tue, 9 Jan 2007 23:17:33 +0000 (23:17 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Tue, 9 Jan 2007 23:17:33 +0000 (23:17 +0000)
eclass/games-mods.eclass

index 4d55b4e0ffc2a4a3f2e5d05256bcd0b6d7b8a91d..b9783715ad27904cf8ebeecf6e3ea51117dd30b8 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.14 2007/01/01 22:27:01 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.15 2007/01/09 23:17:33 wolf31o2 Exp $
 
 # Variables to specify in an ebuild which uses this eclass:
 # GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -315,7 +315,8 @@ games-mods_src_install() {
        # be ${GAMES_DATADIR}/${GAME}/${MOD_DIR} in most cases, and symlinking it
        # into ${GAMES_PREFIX_OPT}/${GAME}/${MOD_DIR} for each game.  This should
        # allow us to support both binary and source-based games easily.
-       if [[ -d "${GAMES_PREFIX_OPT}"/"${GAME}" ]]
+       if [[ -d "${GAMES_PREFIX_OPT}"/"${GAME}" ]] && \
+               [[ "${GAMES_PREFIX_OPT}" != "${GAMES_DATADIR}" ]]
        then
                dodir "${GAMES_PREFIX_OPT}"/"${GAME}"
                mod=$(echo "${INS_DIR}" | sed -e "s:${GAMES_DATADIR}/${GAME}::" -e "s:^/::" )