blob: 5e8d7274dd985a82247fd153fcff7127e08c4489 [file] [log] [blame]
John Stultz681b6252022-01-26 23:52:55 +00001#!/bin/bash
2# fetch, check & extract the current vendor package
3set -e
4
5DIR_PARENT=$(cd $(dirname $0); pwd)
6if [ -z "${ANDROID_BUILD_TOP}" ]; then
7 ANDROID_BUILD_TOP=$(cd ${DIR_PARENT}/../../../; pwd)
8fi
9
10. "${ANDROID_BUILD_TOP}/device/linaro/dragonboard/vendor-package-ver.sh"
11
12PKG_FILE=extract-linaro_devices-${EXPECTED_LINARO_VENDOR_VERSION}
13
14pushd ${ANDROID_BUILD_TOP}
15
16if [ ! -e "${PKG_FILE}.tgz" ]; then
17 curl -L ${VND_PKG_URL} -o ${PKG_FILE}.tgz
18fi
19
20# generate expected sha512sum, check & cleanup
21echo "${EXPECTED_LINARO_VENDOR_SHA} ${PKG_FILE}.tgz" > ${PKG_FILE}.tgz.sha
22sha512sum -c ${PKG_FILE}.tgz.sha
23rm ${PKG_FILE}.tgz.sha
24
25tar -xf ${PKG_FILE}.tgz
26./${PKG_FILE}.sh
27popd