summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetteri Räty <betelgeuse@gentoo.org>2010-04-17 08:30:36 +0000
committerPetteri Räty <betelgeuse@gentoo.org>2010-04-17 08:30:36 +0000
commit54ea2594ab99fa5b2f1c35f824f69400b80221e9 (patch)
tree37a498e420566921918086ba24afa5d12e6cf164 /eclass/java-vm-2.eclass
parentStable on amd64, x86 (#314467) (diff)
downloadgentoo-2-54ea2594ab99fa5b2f1c35f824f69400b80221e9.tar.gz
gentoo-2-54ea2594ab99fa5b2f1c35f824f69400b80221e9.tar.bz2
gentoo-2-54ea2594ab99fa5b2f1c35f824f69400b80221e9.zip
Add quotes around variables that could contain spaces in paths. Fixes bug #315961. Thanks to Michał Górny <gentoo@mgorny.alt.pl>.
Diffstat (limited to 'eclass/java-vm-2.eclass')
-rw-r--r--eclass/java-vm-2.eclass10
1 files changed, 5 insertions, 5 deletions
diff --git a/eclass/java-vm-2.eclass b/eclass/java-vm-2.eclass
index 4d5905468a9a..fb3f20911c04 100644
--- a/eclass/java-vm-2.eclass
+++ b/eclass/java-vm-2.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.30 2010/03/27 22:23:57 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.31 2010/04/17 08:30:36 betelgeuse Exp $
# -----------------------------------------------------------------------------
# @eclass-begin
@@ -133,17 +133,17 @@ set_java_env() {
-e "s/@PLATFORM@/${platform}/g" \
-e "s/@LIBDIR@/$(get_libdir)/g" \
-e "/^LDPATH=.*lib\\/\\\"/s|\"\\(.*\\)\"|\"\\1${platform}/:\\1${platform}/server/\"|" \
- < ${source_env_file} \
- > ${env_file} || die "sed failed"
+ < "${source_env_file}" \
+ > "${env_file}" || die "sed failed"
(
echo "VMHANDLE=\"${VMHANDLE}\""
echo "BUILD_ONLY=\"${JAVA_VM_BUILD_ONLY}\""
- ) >> ${env_file}
+ ) >> "${env_file}"
[[ -n ${JAVA_PROVIDE} ]] && echo "PROVIDES=\"${JAVA_PROVIDE}\"" >> ${env_file}
- local java_home=$(source ${env_file}; echo ${JAVA_HOME})
+ local java_home=$(source "${env_file}"; echo ${JAVA_HOME})
[[ -z ${java_home} ]] && die "No JAVA_HOME defined in ${env_file}"
# Make the symlink