Skip to content

Commit cef79ea

Browse files
committed
Revert "Provide improvements to shell script wrapper. See issue #8 for details. (#9)"
This reverts commit d3be4ac.
1 parent d3be4ac commit cef79ea

File tree

3 files changed

+6
-45
lines changed

3 files changed

+6
-45
lines changed

bin/nrjmx

+5-28
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,6 @@
1-
#!/usr/bin/env bash
2-
3-
set -u
4-
set -o pipefail
5-
6-
JAR="/usr/lib/nrjmx/nrjmx.jar"
7-
if [[ ! -s "${JAR}" ]];then
8-
# Gets the directory where the script is located. Works on mac or linux
9-
SCRIPTDIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd -P)"
10-
JAR="${SCRIPTDIR}/nrjmx.jar"
1+
#!/usr/bin/env sh
2+
if [ -f /usr/lib/nrjmx/nrjmx.jar ]; then
3+
java -jar /usr/lib/nrjmx/nrjmx.jar $@
4+
else
5+
java -jar `dirname $0`/nrjmx.jar $@
116
fi
12-
13-
if [[ ! -s "${JAR}" ]];then
14-
echo "ERROR - jar ${JAR} does not exist" > /dev/stderr
15-
exit 1
16-
fi
17-
18-
JAVA="${JAVA_HOME:-}/bin/java"
19-
if [[ ! -s "${JAVA}" ]];then
20-
JAVA=$(which java 2> /dev/null)
21-
fi
22-
23-
if [[ ! -s "${JAVA}" ]];then
24-
echo "ERROR - unable to find java binary on PATH or in JAVA_HOME/bin" > /dev/stderr
25-
exit 1
26-
fi
27-
28-
"${JAVA}" -jar "${JAR}" $@
29-

nrjmx.iml

-16
This file was deleted.

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>nrjmx</groupId>
55
<artifactId>nrjmx</artifactId>
6-
<version>1.0.3</version>
6+
<version>1.0.4</version>
77
<name>nrjmx</name>
88
<description>The New Relic JMX tool provides a command line tool to connect to a JMX server and retrieve the MBeans it exposes.</description>
99
<organization>

0 commit comments

Comments
 (0)