diff options
author | Ali Polatel <hawking@gentoo.org> | 2008-10-26 17:34:44 +0000 |
---|---|---|
committer | Ali Polatel <hawking@gentoo.org> | 2008-10-26 17:34:44 +0000 |
commit | 4970e19dfec8ae94de0ff8fce7e37c5033d2630f (patch) | |
tree | ecea4235478db208da97dd5e16735542a5bedace /eclass/python.eclass | |
parent | Add ~ppc/~ppc64 (diff) | |
download | gentoo-2-4970e19dfec8ae94de0ff8fce7e37c5033d2630f.tar.gz gentoo-2-4970e19dfec8ae94de0ff8fce7e37c5033d2630f.tar.bz2 gentoo-2-4970e19dfec8ae94de0ff8fce7e37c5033d2630f.zip |
Bashify python_mod_compile, thanks to Steve Long.
Diffstat (limited to 'eclass/python.eclass')
-rw-r--r-- | eclass/python.eclass | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/eclass/python.eclass b/eclass/python.eclass index ca972fb500d5..df301e0bab5f 100644 --- a/eclass/python.eclass +++ b/eclass/python.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/python.eclass,v 1.47 2008/10/26 17:26:18 hawking Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.48 2008/10/26 17:34:44 hawking Exp $ # @ECLASS: python.eclass # @MAINTAINER: @@ -156,14 +156,14 @@ python_mod_exists() { # python_mod_compile /usr/lib/python2.3/site-packages/pygoogle.py # python_mod_compile() { - local f myroot + local f myroot myfiles=() # Check if phase is pkg_postinst() [[ ${EBUILD_PHASE} != postinst ]] &&\ die "${FUNCNAME} should only be run in pkg_postinst()" # allow compiling for older python versions - if [ -n "${PYTHON_OVERRIDE_PYVER}" ]; then + if [[ "${PYTHON_OVERRIDE_PYVER}" ]]; then PYVER=${PYTHON_OVERRIDE_PYVER} else python_version @@ -174,12 +174,12 @@ python_mod_compile() { # respect ROOT for f in $@; do - [ -f "${myroot}/${f}" ] && myfiles="${myfiles} ${myroot}/${f}" + [[ -f "${myroot}/${f}" ]] && myfiles+=("${myroot}/${f}") done - if [ -n "${myfiles}" ]; then - python${PYVER} ${myroot}/usr/$(get_libdir)/python${PYVER}/py_compile.py ${myfiles} - python${PYVER} -O ${myroot}/usr/$(get_libdir)/python${PYVER}/py_compile.py ${myfiles} + if ((${#myfiles[@]})); then + python${PYVER} ${myroot}/usr/$(get_libdir)/python${PYVER}/py_compile.py "${myfiles[@]}" + python${PYVER} -O ${myroot}/usr/$(get_libdir)/python${PYVER}/py_compile.py "${myfiles[@]}" else ewarn "No files to compile!" fi |