diff options
author | 2017-12-28 21:46:15 +0000 | |
---|---|---|
committer | 2018-01-02 22:54:52 +0000 | |
commit | de894fa54f08e5adf3339e717e5d6ac3baf9e0bb (patch) | |
tree | 16a9dc45ddadb9e607b028c58c3cfe13a8ae6884 | |
parent | Don't emit (unset) or (not a symlink) on stderr (bug #549498) (diff) | |
download | eselect-java-de894fa54f08e5adf3339e717e5d6ac3baf9e0bb.tar.gz eselect-java-de894fa54f08e5adf3339e717e5d6ac3baf9e0bb.tar.bz2 eselect-java-de894fa54f08e5adf3339e717e5d6ac3baf9e0bb.zip |
Fix mkdir die message in java-vm module
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/modules/java-vm.eselect.in | 8 |
2 files changed, 4 insertions, 5 deletions
@@ -1,6 +1,7 @@ 0.4.0: * Don't emit (unset) or (not a symlink) on stderr (#549498) + * Fix mkdir die message in java-vm module 0.3.0: diff --git a/src/modules/java-vm.eselect.in b/src/modules/java-vm.eselect.in index c964a34..3d5de4d 100644 --- a/src/modules/java-vm.eselect.in +++ b/src/modules/java-vm.eselect.in @@ -1,5 +1,5 @@ # -*-eselect-*- vim: ft=eselect -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 DESCRIPTION="Manage the Java system and user VM" @@ -147,10 +147,8 @@ set_symlink() { if [[ -z ${target} ]] ; then die -q "Target \"${1}\" doesn't appear to be valid!" elif [[ -d "${VM_BASE}/${target}" ]] ; then - local sym_dir=$(dirname ${symlink}) - if [[ ! -d ${sym_dir} ]]; then - mkdir -p ${sym_dir} || die -q "Could not create ${my_dir}" - fi + local sym_dir=${symlink%/*} + mkdir -p "${sym_dir}" || die -q "Could not create ${sym_dir}" ln -snf "${VM_BASE}/${target}" "${symlink}" else die -q "Target \"${1}\" doesn't appear to be valid!" |