diff options
Diffstat (limited to 'net-misc/ipmiview/files/fake-java.bash')
-rw-r--r-- | net-misc/ipmiview/files/fake-java.bash | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/net-misc/ipmiview/files/fake-java.bash b/net-misc/ipmiview/files/fake-java.bash new file mode 100644 index 000000000000..7d4fbfe32a0b --- /dev/null +++ b/net-misc/ipmiview/files/fake-java.bash @@ -0,0 +1,24 @@ +#!/bin/bash + +for ARG in "${@}"; do + case ${ARG} in + -jar) + EXE=${2} + shift 2 + break + ;; + *) + shift + ;; + esac +done + +if [[ ${EXE} != *.jar ]]; then + echo "error: could not find jar argument in java invocation" >&2 + exit 1 +fi + +EXE=${EXE%.jar} +EXE=${EXE,,} + +exec "${EXE}" "${@}" |