blob: cbadbdebdb522c5424bf2f50687cb2a5e5a562e7 [file] [log] [blame]
John Stultzec36f2d2022-02-02 04:37:53 +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/hikey/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