blob: 21f4768cfa6d81838c9f7e7a1cd528c931c3b87a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/bash
if [[ -n ${GENTOO_VM} ]]; then
vmpath=/usr/lib/jvm/${GENTOO_VM}/
elif [[ -h ${HOME}/.gentoo/user-vm ]]; then
vmpath=${HOME}/.gentoo/user-vm/
else
vmpath=/etc/java-config/system-vm/
fi
tool=$(basename $0)
bin=${vmpath}/bin/${tool}
jrebin=${vmpath}/jre/bin/${tool}
if [[ -x ${bin} ]]; then
exec ${bin} "${@}"
elif [[ -x ${jrebin} ]]; then
exec ${jrebin} "${@}"
else
echo "Want too run ${vmpath}/{,jre}/bin/${tool} but it does not exist or is not executable" >&2
exit 1
fi
|