aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/run-java-tool')
-rw-r--r--src/run-java-tool50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/run-java-tool b/src/run-java-tool
deleted file mode 100644
index 46f804b..0000000
--- a/src/run-java-tool
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/bash
-
-user_vm="${HOME}/.gentoo/java-config-2/current-user-vm"
-system_vm="/etc/java-config-2/current-system-vm"
-# Try GENTOO_VM
-if [[ -n ${GENTOO_VM} ]]; then
- vmpath="/usr/lib/jvm/${GENTOO_VM}/"
-# Then user VM
-elif [[ -h ${user_vm} ]]; then
- vmpath=$(readlink ${user_vm})
-# And fall back to the system VM
-else
- vmpath=$(readlink ${system_vm})
-fi
-tool=$(basename $0)
-bin=${vmpath}/bin/${tool}
-jrebin=${vmpath}/jre/bin/${tool}
-
-vm_handle=$(basename ${vmpath})
-if [[ -x ${bin} ]]; then
- exec ${bin} "${@}"
-elif [[ -x ${jrebin} ]]; then
- exec ${jrebin} "${@}"
-else
- if [[ ! -d ${vmpath} ]]; then
- echo "* Home for VM '${vm_handle}' does not exist: ${vmpath}" >&2
- if [[ -n ${GENTOO_VM} ]]; then
- echo "* Invalid value for GENTOO_VM: ${GENTOO_VM}"
- elif [[ -h ${user_vm} ]]; then
- echo "* Invalid User VM: ${vm_handle}" >&2
- else
- echo "* Invalid System VM: ${vm_handle}" >&2
- fi
- else
- if [[ ${tool} = "run-java-tool" ]]; then
- echo "* run-java-tool was invoked directly" >&2
- echo "* run-java-tool should only be used via symlinks to it" >&2
- else
- echo "* ${tool} is not available for ${vm_handle} on $(uname -m)" >&2
- echo "* IMPORTANT: some Java tools are not available on some VMs on some architectures" >&2
- if (( ${EUID} != 0 )) && [[ "${DISPLAY}" ]] && type -p notify-send > /dev/null; then
- notify-send -i java-icon48 "Gentoo Java Launcher" "<b>${tool}</b> is not available for ${vm_handle}
-<a href=\"http://www.gentoo.org/doc/en/java.xml\">Gentoo Java User Guide</a>"
- fi
- fi
- fi
- exit 1
-fi
-
-