From: Alexander Couzens Date: Wed, 14 Mar 2018 12:32:44 +0000 (+0100) Subject: travis: improve log output of download_sdk X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=bf406d15c0966d3002107491ba9ebdbfd3b38f1f;p=feed%2Fpackages.git travis: improve log output of download_sdk Signed-off-by: Alexander Couzens --- diff --git a/.travis_do.sh b/.travis_do.sh index e2dae41e2c..523dfbc484 100755 --- a/.travis_do.sh +++ b/.travis_do.sh @@ -51,16 +51,28 @@ download_sdk() { gpg --import $PACKAGES_DIR/.travis/D52BBB6B.asc echo 'B09BE781AE8A0CD4702FDCD3833C6010D52BBB6B:6:' | gpg --import-ownertrust + echo_blue "=== Verifying sha256sums signature" gpg --verify sha256sums.asc - grep "$SDK" sha256sums > sha256sums.small + echo_blue "=== Verified sha256sums signature." + if ! grep "$SDK" sha256sums > sha256sums.small ; then + echo_red "=== Can not find $SDK file in sha256sums." + echo_red "=== Is \$SDK out of date?" + false + fi # if missing, outdated or invalid, download again if ! sha256sum -c ./sha256sums.small ; then + echo_blue "=== sha256 doesn't match or SDK file wasn't downloaded yet." + echo_blue "=== Downloading a fresh version" wget "$SDK_PATH/$SDK.tar.xz" -O "$SDK.tar.xz" fi # check again and fail here if the file is still bad - sha256sum -c ./sha256sums.small + echo_blue "Checking sha256sum a second time" + if ! sha256sum -c ./sha256sums.small ; then + echo_red "=== SDK can not be verified!" + false + fi echo_blue "=== SDK is up-to-date" }