diff options
author | Tristan Heaven <tristan@gentoo.org> | 2008-12-01 20:36:43 +0000 |
---|---|---|
committer | Tristan Heaven <tristan@gentoo.org> | 2008-12-01 20:36:43 +0000 |
commit | 1a1c3f85ed1952f9c74afbfee3e80d6a1abd38a2 (patch) | |
tree | a4a36d2b58f840b91ebab7a10aa4ffaaa7227420 /eclass/games.eclass | |
parent | Mark stable on sparc and fix homepage, bug #245864 (diff) | |
download | historical-1a1c3f85ed1952f9c74afbfee3e80d6a1abd38a2.tar.gz historical-1a1c3f85ed1952f9c74afbfee3e80d6a1abd38a2.tar.bz2 historical-1a1c3f85ed1952f9c74afbfee3e80d6a1abd38a2.zip |
patch from Davide Pesavento to fix word splitting issues, bug #241666
Diffstat (limited to 'eclass/games.eclass')
-rw-r--r-- | eclass/games.eclass | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/eclass/games.eclass b/eclass/games.eclass index d232b29df224..7584e7883fea 100644 --- a/eclass/games.eclass +++ b/eclass/games.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.128 2008/09/28 23:40:23 nyhm Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.129 2008/12/01 20:36:43 nyhm Exp $ # devlist: {vapier,wolf31o2,mr_bones_}@gentoo.org -> games@gentoo.org # @@ -152,7 +152,7 @@ games_src_compile() { games_pkg_preinst() { local f - for f in $(find "${D}/${GAMES_STATEDIR}" -type f -printf '%P ' 2>/dev/null) ; do + while read f ; do if [[ -e ${ROOT}/${GAMES_STATEDIR}/${f} ]] ; then cp -p \ "${ROOT}/${GAMES_STATEDIR}/${f}" \ @@ -161,7 +161,7 @@ games_pkg_preinst() { # make the date match the rest of the install touch "${D}/${GAMES_STATEDIR}/${f}" fi - done + done < <(find "${D}/${GAMES_STATEDIR}" -type f -printf '%P\n' 2>/dev/null) } # pkg_postinst function ... create env.d entry and warn about games group @@ -197,11 +197,11 @@ games_ut_unpack() { || die "uncompressing file ${ut_unpack}" fi if [[ -d ${ut_unpack} ]] ; then - for f in $(find "${ut_unpack}" -name '*.uz2' -printf '%f ') ; do - uz2unpack "${ut_unpack}/${f}" "${ut_unpack}/${f/.uz2}" &>/dev/null \ + while read f ; do + uz2unpack "${ut_unpack}/${f}" "${ut_unpack}/${f%.uz2}" &>/dev/null \ || die "uncompressing file ${f}" rm -f "${ut_unpack}/${f}" || die "deleting compressed file ${f}" - done + done < <(find "${ut_unpack}" -maxdepth 1 -name '*.uz2' -printf '%f\n' 2>/dev/null) fi } @@ -224,11 +224,11 @@ games_umod_unpack() { games_link_mods() { if [[ -e ${GAMES_DATADIR}/${GAME} ]] ; then cd "${GAMES_DATADIR}/${GAME}" - for mod in $(find . -type d -printf '%P ') ; do + while read mod ; do if [[ ! -e ${Ddir}/${mod} ]] ; then elog "Creating symlink for ${mod}" dosym "${GAMES_DATADIR}"/${GAME}/${mod} "${dir}"/${mod} || die fi - done + done < <(find . -type d -printf '%P\n' 2>/dev/null) fi } |