diff options
Diffstat (limited to 'resources')
-rwxr-xr-x | resources/scripts/download/mrc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/resources/scripts/download/mrc b/resources/scripts/download/mrc index 69c9eff2..63ec0100 100755 --- a/resources/scripts/download/mrc +++ b/resources/scripts/download/mrc @@ -43,8 +43,11 @@ _mrc_complete="mrc/haswell/mrc.bin" cbdir="coreboot/default" cbfstool="${cbdir}/util/cbfstool/cbfstool" +sname="" + main() { + sname=${0} printf "Downloading Intel MRC blobs\n" check_existing && exit 0 @@ -90,9 +93,7 @@ fetch_mrc() download_image ${_url2} ${_file} ${_sha1sum} fi if [ ! -f $_file ]; then - printf "%s not downloaded / verification failed. Exiting.\n" \ - ${_file} - exit 1 + fail "%{_file} not downloaded / verification failed." fi extract_partition ROOT-A ${_file} root-a.ext2 @@ -173,4 +174,11 @@ extract_coreboot() rm -r "${_unpacked}" } +fail() +{ + printf "%s: ERROR: %s\n" + ${sname} ${1} + exit 1 +} + main $@ |