From 498e68802bacc650ba923024d1cf48b0f097b733 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 9 Dec 2003 20:28:55 +0000 Subject: find does not accept / format ... you have to do `find -name ` --- eclass/games.eclass | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'eclass') diff --git a/eclass/games.eclass b/eclass/games.eclass index ade72657aa66..3bdcfddd8b82 100644 --- a/eclass/games.eclass +++ b/eclass/games.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.55 2003/11/30 23:17:09 plasmaroo Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.56 2003/12/09 20:28:55 vapier Exp $ # # devlist: {vapier,wolf31o2,msterret}@gentoo.org # @@ -138,9 +138,12 @@ games_pkg_postinst() { games_get_cd() { export GAMES_CD=${GAMES_CDROM} if [ -z "${GAMES_CD}" ] ; then + local dir="$(dirname $1)" + local file="$(basename $1)" local mline="" for mline in `mount | egrep -e '(iso|cdrom)' | awk '{print $3}'` ; do - find ${mline} -iname ${1} -maxdepth 1 -printf '' && GAMES_CD=${mline} + [ -d "${mline}/${dir}" ] || continue + find ${mline}/${dir} -iname ${file} -maxdepth 1 -printf '' && GAMES_CD=${mline} done fi [ ! -z "${GAMES_CD}" ] && einfo "Using ${GAMES_CD} as the data source" -- cgit v1.2.3-65-gdbad