Exit with error message is git hash is invalid

This commit is contained in:
popcornmix
2016-07-24 11:49:26 +01:00
parent 234c16ec73
commit b19779b2c8

View File

@@ -266,6 +266,10 @@ function do_update {
function download_rev { function download_rev {
if [[ ${SKIP_DOWNLOAD} -eq 0 ]]; then if [[ ${SKIP_DOWNLOAD} -eq 0 ]]; then
if ! curl -L --output /dev/null --silent --head --fail "${REPO_URI}/tarball/${FW_REV}"; then
echo "Invalid git hash specified"
exit 1
fi
echo " *** Downloading specific firmware revision (this will take a few minutes)" echo " *** Downloading specific firmware revision (this will take a few minutes)"
rm -rf "${FW_REPOLOCAL}" rm -rf "${FW_REPOLOCAL}"
mkdir -p "${FW_REPOLOCAL}" mkdir -p "${FW_REPOLOCAL}"