summaryrefslogtreecommitdiff
path: root/net-misc/ipmiview/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 20:52:04 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 20:52:04 +0100
commit71bc00c87bba1ce31de0dac6c3b7fd1aee6917fc (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /net-misc/ipmiview/files
parent6612a728ea11526a849618ec515ad57131d64416 (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'net-misc/ipmiview/files')
-rw-r--r--net-misc/ipmiview/files/fake-java.bash24
-rw-r--r--net-misc/ipmiview/files/launcher-pre.bash3
2 files changed, 27 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}" "${@}"
diff --git a/net-misc/ipmiview/files/launcher-pre.bash b/net-misc/ipmiview/files/launcher-pre.bash
new file mode 100644
index 000000000000..11b3e52008d5
--- /dev/null
+++ b/net-misc/ipmiview/files/launcher-pre.bash
@@ -0,0 +1,3 @@
+gjl_pwd=${XDG_CONFIG_HOME:-${HOME}/.config}/ipmiview
+mkdir -p "${gjl_pwd}" || exit $?
+ln -snf /usr/share/ipmiview/jre "${gjl_pwd}"/ || exit $?