summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2003-12-09 20:28:55 +0000
committerMike Frysinger <vapier@gentoo.org>2003-12-09 20:28:55 +0000
commit498e68802bacc650ba923024d1cf48b0f097b733 (patch)
treec1d7a16223ffc9649f111ee546665af134b55a71 /eclass
parentfixing Manifest (diff)
downloadgentoo-2-498e68802bacc650ba923024d1cf48b0f097b733.tar.gz
gentoo-2-498e68802bacc650ba923024d1cf48b0f097b733.tar.bz2
gentoo-2-498e68802bacc650ba923024d1cf48b0f097b733.zip
find does not accept <dir>/<file> format ... you have to do `find <dir> -name <file>`
Diffstat (limited to 'eclass')
-rw-r--r--eclass/games.eclass7
1 files changed, 5 insertions, 2 deletions
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"