diff options
author | Austin English <wizardedit@gentoo.org> | 2016-11-28 13:26:49 -0600 |
---|---|---|
committer | Austin English <wizardedit@gentoo.org> | 2016-11-28 13:27:22 -0600 |
commit | 3c3ba13a37b10d693a622ff974223401df5698da (patch) | |
tree | 9b4e2a101e8b7fe89e3167d07b881623a28da386 | |
parent | src/scripts/run-java-tool.bash.in: replace `which` with `command -v` (diff) | |
download | eselect-java-3c3ba13a37b10d693a622ff974223401df5698da.tar.gz eselect-java-3c3ba13a37b10d693a622ff974223401df5698da.tar.bz2 eselect-java-3c3ba13a37b10d693a622ff974223401df5698da.zip |
src/scripts/run-java-tool.bash.in: fix shellcheck issues
-rw-r--r-- | src/scripts/run-java-tool.bash.in | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/scripts/run-java-tool.bash.in b/src/scripts/run-java-tool.bash.in index 67e4dba..9c57fe8 100644 --- a/src/scripts/run-java-tool.bash.in +++ b/src/scripts/run-java-tool.bash.in @@ -24,6 +24,7 @@ vm_handle=${vmpath##*/} toolpath=$( export PATH= + # shellcheck disable=SC1090 . "@GENTOO_PORTAGE_EPREFIX@/usr/share/java-config-2/vm/${vm_handle}" 2> /dev/null : ${PATH:=${vmpath}/bin:${vmpath}/jre/bin} command -v "${tool}" 2> /dev/null @@ -48,7 +49,7 @@ else 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 [ "$(id -u)" != 0 ] && [ -n "${DISPLAY}" ] && type notify-send > /dev/null; then + if [ "$(id -u)" != 0 ] && [ -n "${DISPLAY}" ] && command -v notify-send > /dev/null; then notify-send -i java-icon48 "Gentoo Java Launcher" "<b>${tool}</b> is not available for ${vm_handle} <a href=\"https://wiki.gentoo.org/wiki/Java\">Gentoo Java User Guide</a>" fi |