This repository has been archived by the owner on Jun 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
getSDO.sh
executable file
·52 lines (42 loc) · 1.86 KB
/
getSDO.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
#!/bin/bash
# This script only needs to be run by developers of this project when needing to move up to a new version of SDO.
# Before running, update the versions of the tar files as necessary.
SCRIPT_LOCATION=$(dirname "$0")
# Check the exit code passed in and exit if non-zero
chk() {
local exitCode=$1
local task=$2
if [[ $exitCode == 0 ]]; then return; fi
echo "Error: exit code $exitCode from: $task"
exit $exitCode
}
echo "Retrieving Intel SDO Release 1.10.7 dependencies..."
mkdir -p ${SCRIPT_LOCATION}/sdo && cd ${SCRIPT_LOCATION}/sdo
chk $? 'making sdo dir'
echo "Getting iot-platform-sdk"
curl --progress-bar -LO https://github.com/secure-device-onboard/release/releases/download/v1.10.7/iot-platform-sdk-v1.10.7.tar.gz
chk $? 'downloading iot-platform-sdk'
tar -zxf iot-platform-sdk-v1.10.7.tar.gz
chk $? 'unpacking iot-platform-sdk'
echo "Getting Protocol Reference Implementation"
curl --progress-bar -LO https://github.com/secure-device-onboard/release/releases/download/v1.10.7/pri-v1.10.7.tar.gz
chk $? 'downloading pri'
tar -zxf pri-v1.10.7.tar.gz
chk $? 'unpacking pri'
echo "Getting NOTICES"
curl --progress-bar -LO https://github.com/secure-device-onboard/release/releases/download/v1.10.7/NOTICES-v1.10.7.tar.gz
chk $? 'downloading NOTICES'
tar -zxf NOTICES-v1.10.7.tar.gz
chk $? 'unpacking NOTICES'
echo "Getting Rendezvous Service"
curl --progress-bar -LO https://github.com/secure-device-onboard/release/releases/download/v1.10.7/rendezvous-service-v1.10.7.tar.gz
chk $? 'downloading RV'
tar -zxf rendezvous-service-v1.10.7.tar.gz
chk $? 'unpacking RV'
echo "Getting Supply Chain Tools"
curl --progress-bar -LO https://github.com/secure-device-onboard/release/releases/download/v1.10.7/supply-chain-tools-v1.10.7.tar.gz
chk $? 'downloading SCT'
tar -zxf supply-chain-tools-v1.10.7.tar.gz
chk $? 'unpacking SCT'
cd ${SCRIPT_LOCATION}
echo "Complete."