aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Nichols <nichoj@gentoo.org>2006-07-07 02:17:51 +0000
committerJoshua Nichols <nichoj@gentoo.org>2006-07-07 02:17:51 +0000
commit3e817ff096985d87c322657d2a339c60c2216cb2 (patch)
treed617ea3243248ccb6b83090fe42e418fe861073f
parentAdded fix to correctly mark current plugin. (diff)
downloadjava-config-3e817ff096985d87c322657d2a339c60c2216cb2.tar.gz
java-config-3e817ff096985d87c322657d2a339c60c2216cb2.tar.bz2
java-config-3e817ff096985d87c322657d2a339c60c2216cb2.zip
Allow vm to be set by number
svn path=/java-config-ng/branches/axxo/; revision=2449
-rw-r--r--src/eselect/java-nsplugin.eselect4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/eselect/java-nsplugin.eselect b/src/eselect/java-nsplugin.eselect
index 2883643..0477a4b 100644
--- a/src/eselect/java-nsplugin.eselect
+++ b/src/eselect/java-nsplugin.eselect
@@ -45,6 +45,10 @@ SYSTEM_PLUGIN="${SYSTEM_PLUGIN_DIR}/javaplugin.so"
do_set() {
# TODO check for # of args
local vm=${1}
+ if is_number "${vm}" ; then
+ local targets=( $(get_targets) )
+ vm=${targets[$(( ${vm} - 1 ))]}
+ fi
local plugin="${PLUGINS_HOME}/${vm}-javaplugin.so"
if [[ ! -f ${plugin} ]]; then