-
Notifications
You must be signed in to change notification settings - Fork 2
/
newrelic-dependencies.sh
executable file
·53 lines (44 loc) · 930 Bytes
/
newrelic-dependencies.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash -e
if [ ! -d "libs" ];
then
mkdir libs
fi
AGENT_DOWNLOADED="libs/newrelic-agent-*.jar"
AGENT_BRIDGE_LIBS="libs/agent-bridge.jar"
AGENT_BRIDGE_DS_LIBS="libs/agent-bridge-datastore.jar"
function checkForFiles {
if [ ! -f $AGENT_BRIDGE_LIBS ];
then
getAgentBridge
fi
if [ ! -f $AGENT_BRIDGE_DS_LIBS ];
then
getAgentBridgeDatastore
fi
}
function downloadAgent {
./gradlew getAgent
./gradlew extractJars
./gradlew cleanUp
}
function getAgentBridge {
if [ ! -f $AGENT_DOWNLOADED ];
then
downloadAgent
fi
if [ ! -f $AGENT_BRIDGE_LIBS ];
then
echo "Download of Agent and extraction of Agent Bridge failed"
fi
}
function getAgentBridgeDatastore {
if [ ! -f $AGENT_DOWNLOADED ];
then
downloadAgent
fi
if [ ! -f $AGENT_BRIDGE_DS_LIBS ];
then
echo "Download of Agent and extraction of Agent Bridge Datastore failed"
fi
}
checkForFiles