forked from pescerosso/cloudExplorer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupgrade-sdk.sh
More file actions
35 lines (32 loc) · 924 Bytes
/
upgrade-sdk.sh
File metadata and controls
35 lines (32 loc) · 924 Bytes
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
#!/bin/bash
#
#This script will download the latest AWS SDK for Java and copy the libraries to the Cloud Explorer libs directory
#
function cleanup(){
echo;echo "Cleaning up....."
rm -rf aws*
rm -rf sdk.zip
}
function copylibs(){
echo;echo "Copying the libraries to Cloud Explorer....."
export sdk_dir=`ls | grep aws-java-sdk`
cp -f $sdk_dir/lib/$sdk_dir.jar libs/
cp -f $sdk_dir/third-party/lib/commons* libs/
cp -f $sdk_dir/third-party/lib/commons* libs/
cp -f $sdk_dir/third-party/lib/http* libs/
cp -f $sdk_dir/third-party/lib/jackson* libs/
cp -f $sdk_dir/third-party/lib/joda* libs/
}
function getsdk(){
echo;echo "Downloading the latest Java SDK....."
curl https://sdk-for-java.amazonwebservices.com/latest/aws-java-sdk.zip --output sdk.zip
echo;echo "Extracting the SDK....."
unzip -o -q sdk.zip
rm -f libs/aws*
}
clear
cleanup
getsdk
copylibs
cleanup
echo;echo "Done.";echo;echo