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 | 38d94c26ab9e10ccbce8ca644d9d2f4c30f8a665 (patch) | |
tree | a18f1cb431c8a063aa49a33f8ac006f546519fdd /eclass/python.eclass | |
parent | - open tslib to all remaining ~arches (diff) | |
download | historical-38d94c26ab9e10ccbce8ca644d9d2f4c30f8a665.tar.gz historical-38d94c26ab9e10ccbce8ca644d9d2f4c30f8a665.tar.bz2 historical-38d94c26ab9e10ccbce8ca644d9d2f4c30f8a665.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 |