mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-21 18:23:44 +01:00
add withjava script
This commit is contained in:
parent
73360c9c1e
commit
0f5be3833d
1 changed files with 17 additions and 0 deletions
17
scripts/withjava
Executable file
17
scripts/withjava
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
__usage="
|
||||
USAGE:
|
||||
$0 <java-name> <command...>
|
||||
|
||||
ARGS:
|
||||
<java-name> the jvm to use
|
||||
<command...> the command to run
|
||||
"
|
||||
|
||||
if [ 3 -gt $# ]; then
|
||||
echo -e "$__usage"
|
||||
else
|
||||
export PATH="/usr/lib/jvm/$1/bin:$PATH"
|
||||
${@:2}
|
||||
fi
|
||||
|
Loading…
Reference in a new issue