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